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
| Name | Description |
|---|---|
pytest_addoption | Register the command-line switches without enabling profiling by default. |
pytest_runtest_call | No description. |
pytest_runtest_setup | No description. |
pytest_runtest_teardown | No description. |
pytest_sessionfinish | Publish the profile even when one or more tests failed. |
pytest_sessionstart | Start one independent profiling run for this pytest invocation. |
pytest_addoptionfunction#
def pytest_addoption(parser) -> NoneRegister 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) -> NonePublish the profile even when one or more tests failed.
pytest_sessionstartfunction#
def pytest_sessionstart(session) -> NoneStart one independent profiling run for this pytest invocation.