pytestsysstats package#

Submodules#

pytestsysstats.plugin module#

Process statistics PyTest plugin interface.

class pytestsysstats.plugin.StatsProcesses[source]#

Bases: object

Class which holds the processes being tracked.

Return type

None

processes: Dict[str, psutil.Process]#
add(display_name, process)[source]#

Add a process to track.

Parameters
Return type

None

remove(display_name)[source]#

Remove tracked process.

Parameters

display_name (str) –

Return type

None

items()[source]#

Return the tracked items.

Return type

ItemsView[str, psutil.Process]

class pytestsysstats.plugin.SystemStatsReporter(*, config, stats_processes, terminalreporter)[source]#

Bases: object

Tracked processes pytest reporter.

Return type

None

config: 'Config'#
stats_processes: Optional[StatsProcesses]#
terminalreporter: 'TerminalReporter'#
show_sys_stats: bool#
sys_stats_no_children: bool#
sys_stats_mem_type: str#
pytest_runtest_logreport(report)[source]#

Pytest logreport hook.

Parameters

report (TestReport) –

Return type

None

pytestsysstats.plugin.pytest_addoption(parser)[source]#

Register argparse-style options and ini-style config values.

Parameters

parser (Parser) –

Return type

None

pytestsysstats.plugin.pytest_sessionstart(session)[source]#

Pytest session start routines.

Parameters

session (Session) –

Return type

None

pytestsysstats.plugin.stats_processes(request)[source]#

Session scoped process statistics tracker.

Parameters

request (SubRequest) –

Return type

pytestsysstats.plugin.StatsProcesses

pytestsysstats.version module#