@@ -73,15 +73,19 @@ def pytest_configure(config):
7373
7474@hookspec (firstresult = True )
7575def pytest_cmdline_parse (pluginmanager , args ):
76- """return initialized config object, parsing the specified args. """
76+ """return initialized config object, parsing the specified args.
77+
78+ Stops at first non-None result, see :ref:`firstresult` """
7779
7880def pytest_cmdline_preparse (config , args ):
7981 """(deprecated) modify command line arguments before option parsing. """
8082
8183@hookspec (firstresult = True )
8284def pytest_cmdline_main (config ):
8385 """ called for performing the main command line action. The default
84- implementation will invoke the configure hooks and runtest_mainloop. """
86+ implementation will invoke the configure hooks and runtest_mainloop.
87+
88+ Stops at first non-None result, see :ref:`firstresult` """
8589
8690def pytest_load_initial_conftests (early_config , parser , args ):
8791 """ implements the loading of initial conftest files ahead
@@ -94,7 +98,9 @@ def pytest_load_initial_conftests(early_config, parser, args):
9498
9599@hookspec (firstresult = True )
96100def pytest_collection (session ):
97- """ perform the collection protocol for the given session. """
101+ """ perform the collection protocol for the given session.
102+
103+ Stops at first non-None result, see :ref:`firstresult` """
98104
99105def pytest_collection_modifyitems (session , config , items ):
100106 """ called after collection has been performed, may filter or re-order
@@ -108,11 +114,15 @@ def pytest_ignore_collect(path, config):
108114 """ return True to prevent considering this path for collection.
109115 This hook is consulted for all files and directories prior to calling
110116 more specific hooks.
117+
118+ Stops at first non-None result, see :ref:`firstresult`
111119 """
112120
113121@hookspec (firstresult = True )
114122def pytest_collect_directory (path , parent ):
115- """ called before traversing a directory for collection files. """
123+ """ called before traversing a directory for collection files.
124+
125+ Stops at first non-None result, see :ref:`firstresult` """
116126
117127def pytest_collect_file (path , parent ):
118128 """ return collection Node or None for the given path. Any new node
@@ -133,7 +143,9 @@ def pytest_deselected(items):
133143
134144@hookspec (firstresult = True )
135145def pytest_make_collect_report (collector ):
136- """ perform ``collector.collect()`` and return a CollectReport. """
146+ """ perform ``collector.collect()`` and return a CollectReport.
147+
148+ Stops at first non-None result, see :ref:`firstresult` """
137149
138150# -------------------------------------------------------------------------
139151# Python test function related hooks
@@ -145,15 +157,20 @@ def pytest_pycollect_makemodule(path, parent):
145157 This hook will be called for each matching test module path.
146158 The pytest_collect_file hook needs to be used if you want to
147159 create test modules for files that do not match as a test module.
148- """
160+
161+ Stops at first non-None result, see :ref:`firstresult` """
149162
150163@hookspec (firstresult = True )
151164def pytest_pycollect_makeitem (collector , name , obj ):
152- """ return custom item/collector for a python object in a module, or None. """
165+ """ return custom item/collector for a python object in a module, or None.
166+
167+ Stops at first non-None result, see :ref:`firstresult` """
153168
154169@hookspec (firstresult = True )
155170def pytest_pyfunc_call (pyfuncitem ):
156- """ call underlying test function. """
171+ """ call underlying test function.
172+
173+ Stops at first non-None result, see :ref:`firstresult` """
157174
158175def pytest_generate_tests (metafunc ):
159176 """ generate (multiple) parametrized calls to a test function."""
@@ -163,7 +180,8 @@ def pytest_make_parametrize_id(config, val, argname):
163180 """Return a user-friendly string representation of the given ``val`` that will be used
164181 by @pytest.mark.parametrize calls. Return None if the hook doesn't know about ``val``.
165182 The parameter name is available as ``argname``, if required.
166- """
183+
184+ Stops at first non-None result, see :ref:`firstresult` """
167185
168186# -------------------------------------------------------------------------
169187# generic runtest related hooks
@@ -172,7 +190,9 @@ def pytest_make_parametrize_id(config, val, argname):
172190@hookspec (firstresult = True )
173191def pytest_runtestloop (session ):
174192 """ called for performing the main runtest loop
175- (after collection finished). """
193+ (after collection finished).
194+
195+ Stops at first non-None result, see :ref:`firstresult` """
176196
177197def pytest_itemstart (item , node ):
178198 """ (deprecated, use pytest_runtest_logstart). """
@@ -190,7 +210,9 @@ def pytest_runtest_protocol(item, nextitem):
190210 :py:func:`pytest_runtest_teardown`.
191211
192212 :return boolean: True if no further hook implementations should be invoked.
193- """
213+
214+
215+ Stops at first non-None result, see :ref:`firstresult` """
194216
195217def pytest_runtest_logstart (nodeid , location ):
196218 """ signal the start of running a single test item. """
@@ -215,7 +237,8 @@ def pytest_runtest_makereport(item, call):
215237 """ return a :py:class:`_pytest.runner.TestReport` object
216238 for the given :py:class:`pytest.Item <_pytest.main.Item>` and
217239 :py:class:`_pytest.runner.CallInfo`.
218- """
240+
241+ Stops at first non-None result, see :ref:`firstresult` """
219242
220243def pytest_runtest_logreport (report ):
221244 """ process a test setup/call/teardown report relating to
@@ -227,7 +250,9 @@ def pytest_runtest_logreport(report):
227250
228251@hookspec (firstresult = True )
229252def pytest_fixture_setup (fixturedef , request ):
230- """ performs fixture setup execution. """
253+ """ performs fixture setup execution.
254+
255+ Stops at first non-None result, see :ref:`firstresult` """
231256
232257def pytest_fixture_post_finalizer (fixturedef ):
233258 """ called after fixture teardown, but before the cache is cleared so
@@ -277,7 +302,9 @@ def pytest_report_header(config, startdir):
277302
278303@hookspec (firstresult = True )
279304def pytest_report_teststatus (report ):
280- """ return result-category, shortletter and verbose word for reporting."""
305+ """ return result-category, shortletter and verbose word for reporting.
306+
307+ Stops at first non-None result, see :ref:`firstresult` """
281308
282309def pytest_terminal_summary (terminalreporter , exitstatus ):
283310 """ add additional section in terminal summary reporting. """
@@ -295,7 +322,9 @@ def pytest_logwarning(message, code, nodeid, fslocation):
295322
296323@hookspec (firstresult = True )
297324def pytest_doctest_prepare_content (content ):
298- """ return processed content for a given doctest"""
325+ """ return processed content for a given doctest
326+
327+ Stops at first non-None result, see :ref:`firstresult` """
299328
300329# -------------------------------------------------------------------------
301330# error handling and internal debugging hooks
0 commit comments