From 2ca39443a37df55e07256f3d170a9c7bd59109d6 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Thu, 17 Dec 2009 09:33:41 +0100 Subject: [PATCH] some doc fixes --HG-- branch : trunk --- doc/test/customize.txt | 6 +++++- doc/test/plugin/hookspec.txt | 6 +++--- py/plugin/hookspec.py | 6 +++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/doc/test/customize.txt b/doc/test/customize.txt index 1fc9b646d..02ae0c090 100644 --- a/doc/test/customize.txt +++ b/doc/test/customize.txt @@ -273,6 +273,8 @@ for example: When the test run finishes this corresponding finalizer hook is called: +.. sourcecode:: python + def pytest_unconfigure(config): ... @@ -281,7 +283,9 @@ adding global py.test helpers and functionality -------------------------------------------------------------------- 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(): """ return dictionary with items to be made available on py.test. namespace """ diff --git a/doc/test/plugin/hookspec.txt b/doc/test/plugin/hookspec.txt index 5cd087c64..0042465f2 100644 --- a/doc/test/plugin/hookspec.txt +++ b/doc/test/plugin/hookspec.txt @@ -62,7 +62,7 @@ hook specification sourcecode pytest_pycollect_makeitem.firstresult = True def pytest_pyfunc_call(pyfuncitem): - """ perform function call to the with the given function arguments. """ + """ call underlying test function. """ pytest_pyfunc_call.firstresult = True def pytest_generate_tests(metafunc): @@ -73,7 +73,7 @@ hook specification sourcecode # ------------------------------------------------------------------------- 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 def pytest_runtest_setup(item): @@ -86,7 +86,7 @@ hook specification sourcecode """ called after pytest_runtest_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 def pytest_runtest_logreport(report): diff --git a/py/plugin/hookspec.py b/py/plugin/hookspec.py index e859125a6..22e65e2b4 100644 --- a/py/plugin/hookspec.py +++ b/py/plugin/hookspec.py @@ -56,7 +56,7 @@ def pytest_pycollect_makeitem(collector, name, obj): pytest_pycollect_makeitem.firstresult = True def pytest_pyfunc_call(pyfuncitem): - """ perform function call to the with the given function arguments. """ + """ call underlying test function. """ pytest_pyfunc_call.firstresult = True def pytest_generate_tests(metafunc): @@ -67,7 +67,7 @@ def pytest_generate_tests(metafunc): # ------------------------------------------------------------------------- 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 def pytest_runtest_setup(item): @@ -80,7 +80,7 @@ def pytest_runtest_teardown(item): """ called after pytest_runtest_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 def pytest_runtest_logreport(report):