Add reference docs for pytest_sessionstart/finish and update their docstrings

This commit is contained in:
Bruno Oliveira 2018-03-29 19:48:48 -03:00
parent f1c9efc358
commit daf1de0fed
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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
~~~~~~~~~~~~~~~~~~