Merge pull request #3357 from nicoddemus/session-hooks-ref
Add reference docs for pytest_sessionstart/finish and update their docstrings
This commit is contained in:
commit
9326759a63
|
@ -413,14 +413,15 @@ def pytest_fixture_post_finalizer(fixturedef, request):
|
|||
|
||||
|
||||
def pytest_sessionstart(session):
|
||||
""" before session.main() is called.
|
||||
""" called after the ``Session`` object has been created and before performing collection
|
||||
and entering the run test loop.
|
||||
|
||||
:param _pytest.main.Session session: the pytest session object
|
||||
"""
|
||||
|
||||
|
||||
def pytest_sessionfinish(session, exitstatus):
|
||||
""" whole test run finishes.
|
||||
""" called after whole test run finished, right before returning the exit status to the system.
|
||||
|
||||
:param _pytest.main.Session session: the pytest session object
|
||||
:param int exitstatus: the status which pytest will return to the system
|
||||
|
|
|
@ -527,6 +527,8 @@ Initialization hooks called for plugins and ``conftest.py`` files.
|
|||
.. autofunction:: pytest_addhooks
|
||||
.. autofunction:: pytest_configure
|
||||
.. autofunction:: pytest_unconfigure
|
||||
.. autofunction:: pytest_sessionstart
|
||||
.. autofunction:: pytest_sessionfinish
|
||||
|
||||
Test running hooks
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
|
Loading…
Reference in New Issue