Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytest-dev/pytest
/ functions
Functions
4,602 in github.com/pytest-dev/pytest
⨍
Functions
4,602
◇
Types & classes
572
↳
Endpoints
16
Function
pytest_configure
(config)
testing/example_scripts/conftest_usageerror/conftest.py:1
Method
pytest_configure
(x, config: Config)
src/_pytest/pytester.py:1100
Method
pytest_configure
:meta private:
src/_pytest/config/__init__.py:479
Function
pytest_deselected
Called for deselected test items, e.g. by keyword. May be called multiple times.
src/_pytest/hookspec.py:317
Function
pytest_enter_pdb
Called upon pdb.set_trace(). Can be used by plugins to take special action just before the python debugger enters interactive mode. :par
src/_pytest/hookspec.py:909
Function
pytest_enter_pdb
Cancel any traceback dumping due to timeout before entering pdb.
src/_pytest/faulthandler.py:84
Function
pytest_exception_interact
Called when an exception was raised which can potentially be interactively handled. May be called during collection (see :hook:`pytest_make_c
src/_pytest/hookspec.py:890
Function
pytest_exception_interact
Cancel any traceback dumping due to an interactive exception being raised.
src/_pytest/faulthandler.py:92
Function
pytest_fixture_post_finalizer
Called after fixture teardown, but before the cache is cleared, so the fixture result ``fixturedef.cached_result`` is still available (not ``N
src/_pytest/hookspec.py:585
Function
pytest_fixture_post_finalizer
(fixturedef: FixtureDef[object])
src/_pytest/setuponly.py:51
Function
pytest_fixture_setup
Perform fixture setup execution. :returns: The return value of the call to the fixture function. Stops at first non-None result, see :ref:`f
src/_pytest/hookspec.py:569
Function
pytest_fixture_setup
( fixturedef: FixtureDef[object], request: SubRequest )
src/_pytest/setupplan.py:24
Function
pytest_fixture_setup
Execution of fixture setup.
src/_pytest/fixtures.py:1107
Function
pytest_fixture_setup
( fixturedef: FixtureDef[object], request: SubRequest )
src/_pytest/setuponly.py:32
Function
pytest_generate_tests
Generate (multiple) parametrized calls to a test function.
src/_pytest/hookspec.py:379
Function
pytest_generate_tests
(metafunc: "Metafunc")
src/_pytest/python.py:146
Function
pytest_generate_tests
(metafunc)
testing/example_scripts/issue_519.py:8
Method
pytest_generate_tests
Generate new tests based on parametrized fixtures used by the given metafunc
src/_pytest/fixtures.py:1552
Function
pytest_ignore_collect
Return True to prevent considering this path for collection. This hook is consulted for all files and directories prior to calling more speci
src/_pytest/hookspec.py:264
Function
pytest_ignore_collect
(collection_path: Path, config: Config)
src/_pytest/main.py:375
Function
pytest_ignore_collect
(collection_path)
testing/example_scripts/collect/package_infinite_recursion/conftest.py:1
Function
pytest_internalerror
Called for internal errors. Return True to suppress the fallback handling of printing an INTERNALERROR message directly to sys.stderr.
src/_pytest/hookspec.py:873
Method
pytest_internalerror
(self)
src/_pytest/capture.py:798
Method
pytest_internalerror
(self, excinfo: ExceptionInfo[BaseException])
src/_pytest/debugging.py:298
Method
pytest_internalerror
(self)
testing/test_config.py:1235
Function
pytest_itemcollected
We just collected a test item.
src/_pytest/hookspec.py:309
Function
pytest_keyboard_interrupt
Called for keyboard interrupt.
src/_pytest/hookspec.py:884
Method
pytest_keyboard_interrupt
(self, excinfo: ExceptionInfo[BaseException])
src/_pytest/terminal.py:825
Function
pytest_leave_pdb
Called when leaving pdb (e.g. with continue after pdb.set_trace()). Can be used by plugins to take special action just after the python debug
src/_pytest/hookspec.py:920
Function
pytest_load_initial_conftests
Called to implement the loading of initial conftest files ahead of command line option parsing. .. note:: This hook will not be calle
src/_pytest/hookspec.py:187
Function
pytest_load_initial_conftests
(early_config: Config)
src/_pytest/pythonpath.py:13
Function
pytest_load_initial_conftests
( early_config: "Config", )
src/_pytest/warnings.py:135
Function
pytest_load_initial_conftests
Monkeypatch legacy path attributes in several classes, as early as possible.
src/_pytest/legacypath.py:407
Function
pytest_load_initial_conftests
(early_config: Config)
src/_pytest/capture.py:128
Method
pytest_load_initial_conftests
(self)
testing/test_config.py:1261
Function
pytest_make_collect_report
Perform :func:`collector.collect() <pytest.Collector.collect>` and return a :class:`~pytest.CollectReport`. Stops at first non-None result, s
src/_pytest/hookspec.py:325
Function
pytest_make_collect_report
(collector: Collector)
src/_pytest/runner.py:370
Method
pytest_make_collect_report
(self, collector: nodes.Collector)
src/_pytest/cacheprovider.py:215
Method
pytest_make_collect_report
( self, collector: nodes.Collector )
src/_pytest/cacheprovider.py:266
Function
pytest_make_parametrize_id
Return a user-friendly string representation of the given ``val`` that will be used by @pytest.mark.parametrize calls, or None if the hook doe
src/_pytest/hookspec.py:384
Function
pytest_markeval_namespace
Called when constructing the globals dictionary used for evaluating string conditions in xfail/skipif markers. This is useful when the condit
src/_pytest/hookspec.py:852
Function
pytest_plugin_registered
A new pytest plugin got registered. :param plugin: The plugin module or instance. :param pytest.PytestPluginManager manager: pytest plugin ma
src/_pytest/hookspec.py:68
Function
pytest_plugin_registered
(plugin: object, manager: PytestPluginManager)
src/_pytest/legacypath.py:462
Method
pytest_plugin_registered
(self, plugin: _PluggyPlugin)
src/_pytest/terminal.py:485
Method
pytest_plugin_registered
(self, plugin: _PluggyPlugin)
src/_pytest/fixtures.py:1470
Method
pytest_plugin_registered
(self)
testing/test_pluginmanager.py:106
Method
pytest_plugin_registered
(self)
testing/test_pluginmanager.py:110
Function
pytest_pycollect_makeitem
Return a custom item/collector for a Python object in a module, or None. Stops at first non-None result, see :ref:`firstresult`.
src/_pytest/hookspec.py:362
Function
pytest_pycollect_makeitem
(collector: "PyCollector", name: str, obj: object)
src/_pytest/python.py:227
Function
pytest_pycollect_makeitem
( collector: PyCollector, name: str, obj: object )
src/_pytest/unittest.py:44
Function
pytest_pycollect_makemodule
Return a Module collector or None for the given path. This hook will be called for each matching test module path. The pytest_collect_file ho
src/_pytest/hookspec.py:339
Function
pytest_pycollect_makemodule
(module_path: Path, parent)
src/_pytest/python.py:218
Function
pytest_pyfunc_call
Call underlying test function. Stops at first non-None result, see :ref:`firstresult`.
src/_pytest/hookspec.py:372
Function
pytest_pyfunc_call
(pyfuncitem: "Function")
src/_pytest/python.py:186
Method
pytest_pyfunc_call
(self)
testing/python/collect.py:551
Function
pytest_report_collectionfinish
Return a string or list of strings to be displayed after collection has finished successfully. These strings will be displayed after the stan
src/_pytest/hookspec.py:705
Method
pytest_report_collectionfinish
(self)
src/_pytest/stepwise.py:116
Function
pytest_report_from_serializable
Restore a report object previously serialized with :hook:`pytest_report_to_serializable`.
src/_pytest/hookspec.py:555
Function
pytest_report_from_serializable
( data: Dict[str, Any], )
src/_pytest/reports.py:433
Function
pytest_report_header
Display cachedir with --cache-show and if non-default.
src/_pytest/cacheprovider.py:525
Function
pytest_report_header
Return a string or list of strings to be displayed as header info for terminal reporting. :param pytest.Config config: The pytest config object.
src/_pytest/hookspec.py:676
Function
pytest_report_header
(config: Config)
src/_pytest/helpconfig.py:246
Function
pytest_report_teststatus
(report: BaseReport)
src/_pytest/skipping.py:290
Function
pytest_report_teststatus
Return result-category, shortletter and verbose word for status reporting. The result-category is a category in which to count the result, fo
src/_pytest/hookspec.py:738
Function
pytest_report_teststatus
(report: BaseReport)
src/_pytest/terminal.py:265
Function
pytest_report_teststatus
(report: BaseReport)
src/_pytest/runner.py:202
Function
pytest_report_to_serializable
Serialize the given report object into a data structure suitable for sending over the wire, e.g. converted to JSON.
src/_pytest/hookspec.py:546
Function
pytest_report_to_serializable
( report: Union[CollectReport, TestReport] )
src/_pytest/reports.py:422
Function
pytest_runtest_call
()
src/_pytest/unraisableexception.py:87
Function
pytest_runtest_call
(item: Item)
src/_pytest/skipping.py:246
Function
pytest_runtest_call
Called to run the test for test item (the call phase). The default implementation calls ``item.runtest()``.
src/_pytest/hookspec.py:499
Function
pytest_runtest_call
(item: Item)
src/_pytest/runner.py:159
Function
pytest_runtest_call
()
src/_pytest/threadexception.py:82
Method
pytest_runtest_call
(self, item: Item)
src/_pytest/capture.py:784
Function
pytest_runtest_logfinish
Called at the end of running the runtest protocol for a single item. See :hook:`pytest_runtest_protocol` for a description of the runtest protoco
src/_pytest/hookspec.py:477
Method
pytest_runtest_logfinish
(self, nodeid: str)
src/_pytest/terminal.py:575
Function
pytest_runtest_logreport
Process the :class:`~pytest.TestReport` produced for each of the setup, call and teardown runtest phases of an item. See :hook:`pytest_runtes
src/_pytest/hookspec.py:537
Method
pytest_runtest_logreport
Handle a setup/call/teardown report, generating the appropriate XML tags as necessary. Note: due to plugins like xdist, this hook may
src/_pytest/junitxml.py:532
Method
pytest_runtest_logreport
(self)
src/_pytest/logging.py:690
Method
pytest_runtest_logreport
(self, report: TestReport)
src/_pytest/cacheprovider.py:312
Method
pytest_runtest_logreport
(self, report: TestReport)
src/_pytest/terminal.py:509
Method
pytest_runtest_logreport
(self, report: TestReport)
src/_pytest/stepwise.py:92
Function
pytest_runtest_logstart
Called at the start of running the runtest protocol for a single item. See :hook:`pytest_runtest_protocol` for a description of the runtest proto
src/_pytest/hookspec.py:465
Method
pytest_runtest_logstart
( self, nodeid: str, location: Tuple[str, Optional[int], str] )
src/_pytest/terminal.py:496
Function
pytest_runtest_makereport
(item: Item, call: CallInfo[None])
src/_pytest/skipping.py:263
Function
pytest_runtest_makereport
Called to create a :class:`~pytest.TestReport` for each of the setup, call and teardown runtest phases of a test item. See :hook:`pytest_runt
src/_pytest/hookspec.py:523
Function
pytest_runtest_makereport
(item: Item, call: CallInfo[None])
src/_pytest/runner.py:366
Function
pytest_runtest_makereport
(item: Item, call: CallInfo[None])
src/_pytest/unittest.py:334
Function
pytest_runtest_protocol
Perform the runtest protocol for a single test item. The default runtest protocol is this (see individual hooks for full details): - ``pytes
src/_pytest/hookspec.py:428
Function
pytest_runtest_protocol
(item: Item, nextitem: Optional[Item])
src/_pytest/runner.py:110
Function
pytest_runtest_protocol
(item: Item)
src/_pytest/warnings.py:98
Function
pytest_runtest_protocol
(item: Item)
src/_pytest/faulthandler.py:68
Function
pytest_runtest_protocol
(item: Item)
src/_pytest/unittest.py:364
Function
pytest_runtest_protocol
Setup the pytest_assertrepr_compare and pytest_assertion_pass hooks. The rewrite module will use util._reprcompare if it exists to use custom
src/_pytest/assertion/__init__.py:116
Function
pytest_runtest_setup
()
src/_pytest/unraisableexception.py:82
Function
pytest_runtest_setup
Called to perform the setup phase for a test item. The default implementation runs ``setup()`` on ``item`` and all of its parents (which have
src/_pytest/hookspec.py:489
Function
pytest_runtest_setup
(item: Item)
src/_pytest/runner.py:154
Function
pytest_runtest_setup
()
src/_pytest/threadexception.py:77
Function
pytest_runtest_setup
(item: Item)
src/_pytest/nose.py:10
Function
pytest_runtest_setup
(item)
doc/en/example/assertion/global_testmodule_config/conftest.py:8
← previous
next →
1,801–1,900 of 4,602, ranked by callers