some doc fixes

--HG--
branch : trunk
This commit is contained in:
holger krekel 2009-12-17 09:33:41 +01:00
parent 7637a6ecda
commit 2ca39443a3
3 changed files with 11 additions and 7 deletions

View File

@ -273,6 +273,8 @@ for example:
When the test run finishes this corresponding finalizer hook is called: When the test run finishes this corresponding finalizer hook is called:
.. sourcecode:: python
def pytest_unconfigure(config): def pytest_unconfigure(config):
... ...
@ -283,6 +285,8 @@ adding global py.test helpers and functionality
If you want to make global helper functions or objects available If you want to make global helper functions or objects available
to your test code you can implement: to your test code you can implement:
.. sourcecode:: python
def pytest_namespace(): def pytest_namespace():
""" return dictionary with items to be made available on py.test. namespace """ """ return dictionary with items to be made available on py.test. namespace """

View File

@ -62,7 +62,7 @@ hook specification sourcecode
pytest_pycollect_makeitem.firstresult = True pytest_pycollect_makeitem.firstresult = True
def pytest_pyfunc_call(pyfuncitem): def pytest_pyfunc_call(pyfuncitem):
""" perform function call to the with the given function arguments. """ """ call underlying test function. """
pytest_pyfunc_call.firstresult = True pytest_pyfunc_call.firstresult = True
def pytest_generate_tests(metafunc): def pytest_generate_tests(metafunc):
@ -73,7 +73,7 @@ hook specification sourcecode
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
def pytest_runtest_protocol(item): def pytest_runtest_protocol(item):
""" implement fixture, run and report protocol. """ """ implement fixture, run and report about the given test item. """
pytest_runtest_protocol.firstresult = True pytest_runtest_protocol.firstresult = True
def pytest_runtest_setup(item): def pytest_runtest_setup(item):
@ -86,7 +86,7 @@ hook specification sourcecode
""" called after pytest_runtest_call(). """ """ called after pytest_runtest_call(). """
def pytest_runtest_makereport(item, call): def pytest_runtest_makereport(item, call):
""" make ItemTestReport for the given item and call outcome. """ """ make a test report for the given item and call outcome. """
pytest_runtest_makereport.firstresult = True pytest_runtest_makereport.firstresult = True
def pytest_runtest_logreport(report): def pytest_runtest_logreport(report):

View File

@ -56,7 +56,7 @@ def pytest_pycollect_makeitem(collector, name, obj):
pytest_pycollect_makeitem.firstresult = True pytest_pycollect_makeitem.firstresult = True
def pytest_pyfunc_call(pyfuncitem): def pytest_pyfunc_call(pyfuncitem):
""" perform function call to the with the given function arguments. """ """ call underlying test function. """
pytest_pyfunc_call.firstresult = True pytest_pyfunc_call.firstresult = True
def pytest_generate_tests(metafunc): def pytest_generate_tests(metafunc):
@ -67,7 +67,7 @@ def pytest_generate_tests(metafunc):
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
def pytest_runtest_protocol(item): def pytest_runtest_protocol(item):
""" implement fixture, run and report protocol. """ """ implement fixture, run and report about the given test item. """
pytest_runtest_protocol.firstresult = True pytest_runtest_protocol.firstresult = True
def pytest_runtest_setup(item): def pytest_runtest_setup(item):
@ -80,7 +80,7 @@ def pytest_runtest_teardown(item):
""" called after pytest_runtest_call(). """ """ called after pytest_runtest_call(). """
def pytest_runtest_makereport(item, call): def pytest_runtest_makereport(item, call):
""" make ItemTestReport for the given item and call outcome. """ """ make a test report for the given item and call outcome. """
pytest_runtest_makereport.firstresult = True pytest_runtest_makereport.firstresult = True
def pytest_runtest_logreport(report): def pytest_runtest_logreport(report):