Skip to content
Projects

scope_profiler.pytest_plugin

Opt-in pytest integration for recording test-phase durations.

The plugin deliberately owns an independent :class:ProfileManager. Tests are free to set up and finalize the process-wide ProfileManager themselves without corrupting the profile pytest is collecting.

Functions

NameDescription
pytest_addoptionRegister the command-line switches without enabling profiling by default.
pytest_runtest_callNo description.
pytest_runtest_setupNo description.
pytest_runtest_teardownNo description.
pytest_sessionfinishPublish the profile even when one or more tests failed.
pytest_sessionstartStart one independent profiling run for this pytest invocation.

pytest_addoptionfunction#

def pytest_addoption(parser) -> None

Register the command-line switches without enabling profiling by default.

pytest_runtest_callfunction#

def pytest_runtest_call(item)

pytest_runtest_setupfunction#

def pytest_runtest_setup(item)

pytest_runtest_teardownfunction#

def pytest_runtest_teardown(item, nextitem)

pytest_sessionfinishfunction#

def pytest_sessionfinish(session, exitstatus) -> None

Publish the profile even when one or more tests failed.

pytest_sessionstartfunction#

def pytest_sessionstart(session) -> None

Start one independent profiling run for this pytest invocation.