Skip to content

Commit

Permalink
Merge pull request #2261 from vmuriart/doc-report_header
Browse files Browse the repository at this point in the history
Document pytest_report_header and conftest behavior
  • Loading branch information
nicoddemus authored Feb 17, 2017
2 parents 9c809f5 + a88017c commit 21a09f0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions _pytest/hookspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def pytest_unconfigure(config):


# -------------------------------------------------------------------------
# hooks for customising the assert methods
# hooks for customizing the assert methods
# -------------------------------------------------------------------------

def pytest_assertrepr_compare(config, op, left, right):
Expand All @@ -263,7 +263,14 @@ def pytest_assertrepr_compare(config, op, left, right):
# -------------------------------------------------------------------------

def pytest_report_header(config, startdir):
""" return a string to be displayed as header info for terminal reporting."""
""" return a string to be displayed as header info for terminal reporting.
.. note::
This function should be implemented only in plugins or ``conftest.py``
files situated at the tests root directory due to how pytest
:ref:`discovers plugins during startup <pluginorder>`.
"""

@hookspec(firstresult=True)
def pytest_report_teststatus(report):
Expand Down

0 comments on commit 21a09f0

Please sign in to comment.