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
↓ 2 callers
Function
evaluate_condition
Evaluate a single skipif/xfail condition. If an old-style string condition is given, it is eval()'d, otherwise the condition is bool()'d. If
src/_pytest/skipping.py:85
↓ 2 callers
Function
exit
Exit testing process. :param reason: The message to show as the reason for exiting pytest. reason has a default value only becau
src/_pytest/outcomes.py:116
↓ 2 callers
Function
expr
(s: Scanner)
src/_pytest/mark/expression.py:145
↓ 2 callers
Function
extract_suffixes
Return the parts of the paths following the prefix. :param iter: Iterator over path names. :param prefix: Expected prefix of the path names.
src/_pytest/pathlib.py:163
↓ 2 callers
Function
fin
()
src/_pytest/debugging.py:84
↓ 2 callers
Function
find_prefixed
Find all elements in root that begin with the prefix, case insensitive.
src/_pytest/pathlib.py:155
↓ 2 callers
Function
find_suffixes
Combine find_prefixes and extract_suffixes.
src/_pytest/pathlib.py:174
↓ 2 callers
Method
finish
(self, request: SubRequest)
src/_pytest/fixtures.py:1017
↓ 2 callers
Method
for_later
Return an unfilled ExceptionInfo.
src/_pytest/_code/code.py:518
↓ 2 callers
Function
format_session_duration
Format the given seconds in a human readable manner to show in the final summary.
src/_pytest/terminal.py:1367
↓ 2 callers
Method
from_item
(cls, item: "Item")
src/_pytest/mark/__init__.py:230
↓ 2 callers
Function
func
()
testing/test_compat.py:69
↓ 2 callers
Function
func
()
testing/code/test_code.py:58
↓ 2 callers
Method
get_closest_marker
(self, name: str)
src/_pytest/nodes.py:381
↓ 2 callers
Function
get_dirs_from_args
(args: Iterable[str])
src/_pytest/config/findpaths.py:137
↓ 2 callers
Method
get_exconly
( self, excinfo: ExceptionInfo[BaseException], indent: int = 4, markall: bool
src/_pytest/_code/code.py:759
↓ 2 callers
Function
get_extended_length_path_str
Convert a path to a Windows extended length path.
src/_pytest/pathlib.py:135
↓ 2 callers
Function
get_optionflags
(parent)
src/_pytest/doctest.py:395
↓ 2 callers
Function
get_public_names
Only return names from iterator values without a leading underscore.
src/_pytest/pytester.py:210
↓ 2 callers
Method
get_records
Get the logging records for one of the possible test phases. :param str when: Which test phase to obtain the records from. Valid
src/_pytest/logging.py:384
↓ 2 callers
Function
get_scope_node
( node: nodes.Node, scope: Scope )
src/_pytest/fixtures.py:132
↓ 2 callers
Method
get_terminal_writer
(self)
src/_pytest/config/__init__.py:1003
↓ 2 callers
Method
getfailures
( self, names: "Literal['pytest_collectreport']", )
src/_pytest/pytester.py:384
↓ 2 callers
Method
getfirstlinesource
(self)
src/_pytest/_code/code.py:241
↓ 2 callers
Method
getfixturedefs
Get a list of fixtures which are applicable to the given node id. :param str argname: Name of the fixture to search for. :param str n
src/_pytest/fixtures.py:1665
↓ 2 callers
Function
getpluginversioninfo
(config: Config)
src/_pytest/helpconfig.py:234
↓ 2 callers
Function
getrawcode
Return code object for given function.
src/_pytest/_code/source.py:129
↓ 2 callers
Function
getreportopt
(config: Config)
src/_pytest/terminal.py:239
↓ 2 callers
Method
getvalue
Deprecated, use getoption() instead.
src/_pytest/config/__init__.py:1505
↓ 2 callers
Method
getvalueorskip
Deprecated, use getoption(skip=True) instead.
src/_pytest/config/__init__.py:1509
↓ 2 callers
Method
global_and_fixture_disabled
Context manager to temporarily disable global and current fixture capturing.
src/_pytest/capture.py:731
↓ 2 callers
Function
globf
(x)
doc/en/example/assertion/failure_demo.py:159
↓ 2 callers
Function
h
()
testing/code/test_excinfo.py:96
↓ 2 callers
Method
hasopt
(self, char: str)
src/_pytest/terminal.py:384
↓ 2 callers
Method
indent
Return a copy of the source object with all lines indented by the given indent-string.
src/_pytest/_code/source.py:83
↓ 2 callers
Method
index
(self, value)
src/_pytest/capture.py:503
↓ 2 callers
Function
insert_missing_modules
Used by ``import_path`` to create intermediate modules when using mode=importlib. When we want to import a module as "src.tests.test_foo" fo
src/_pytest/pathlib.py:593
↓ 2 callers
Function
is_async_function
Return True if the given function seems to be an async function or an async generator.
src/_pytest/compat.py:80
↓ 2 callers
Method
is_rewrite_disabled
(docstring: str)
src/_pytest/assertion/rewrite.py:764
↓ 2 callers
Method
is_started
Whether actively capturing -- not suspended or stopped.
src/_pytest/capture.py:591
↓ 2 callers
Function
isattrs
(obj: Any)
src/_pytest/assertion/util.py:126
↓ 2 callers
Function
iscoroutinefunction
Return True if func is a coroutine function (a function defined with async def syntax, and doesn't contain yield), or a function decorated with
src/_pytest/compat.py:68
↓ 2 callers
Function
isdatacls
(obj: Any)
src/_pytest/assertion/util.py:122
↓ 2 callers
Method
isinitpath
(self, path: Union[str, "os.PathLike[str]"])
src/_pytest/python.py:688
↓ 2 callers
Function
isnamedtuple
(obj: Any)
src/_pytest/assertion/util.py:118
↓ 2 callers
Method
isnosetest
Look for the __test__ attribute, which is applied by the @nose.tools.istest decorator.
src/_pytest/python.py:373
↓ 2 callers
Method
load
(self)
testing/test_config.py:942
↓ 2 callers
Function
locate_config
Search in the list of arguments for a valid ini-file for pytest, and return a tuple of (rootdir, inifile, cfg-dict).
src/_pytest/config/findpaths.py:88
↓ 2 callers
Function
lsof_check
()
testing/test_capture.py:942
↓ 2 callers
Function
main
Perform an in-process test run. :param args: List of command line arguments. :param plugins: List of plugin objects to be auto-registered dur
src/_pytest/config/__init__.py:133
↓ 2 callers
Method
make_conftest_for_args
(self, pytester: Pytester)
testing/test_config.py:667
↓ 2 callers
Method
make_conftest_for_linelist
(self, pytester: Pytester)
testing/test_config.py:703
↓ 2 callers
Method
make_function
(pytester: Pytester, **kwargs: Any)
testing/python/collect.py:294
↓ 2 callers
Function
mangle_test_address
(address: str)
src/_pytest/junitxml.py:450
↓ 2 callers
Method
markup
(self, text, **kw)
testing/conftest.py:93
↓ 2 callers
Function
module_name_from_path
Return a dotted module name based on the given path, anchored on root. For example: path="projects/src/tests/test_foo.py" and root="/project
src/_pytest/pathlib.py:572
↓ 2 callers
Method
names
(self)
src/_pytest/config/argparsing.py:278
↓ 2 callers
Method
newinstance
(self)
src/_pytest/python.py:790
↓ 2 callers
Method
next_lower
Return the next lower scope.
src/_pytest/scope.py:42
↓ 2 callers
Method
node
Underlying collection node (depends on current request scope).
src/_pytest/fixtures.py:466
↓ 2 callers
Method
notify_exception
( self, excinfo: ExceptionInfo[BaseException], option: Optional[argparse.Namespace] =
src/_pytest/config/__init__.py:1035
↓ 2 callers
Method
obj
Underlying Python object.
src/_pytest/python.py:292
↓ 2 callers
Method
parse_summary_nouns
Extract the nouns from a pytest terminal summary line. It always returns the plural noun for consistency:: ======= 1 failed, 1 p
src/_pytest/pytester.py:568
↓ 2 callers
Function
path_matches_patterns
Return whether path matches any of the patterns in the list of globs given.
src/_pytest/python.py:213
↓ 2 callers
Function
pluralize
(count: int, noun: str)
src/_pytest/terminal.py:1340
↓ 2 callers
Method
pop_outerr_to_orig
Pop current snapshot out/err capture and flush to orig streams.
src/_pytest/capture.py:550
↓ 2 callers
Function
post_mortem
(t: types.TracebackType)
src/_pytest/debugging.py:383
↓ 2 callers
Function
prepend_pythonpath
(*dirs)
testing/acceptance_test.py:14
↓ 2 callers
Method
pytest_collect_file
(self, file_path: Path)
testing/test_collection.py:279
↓ 2 callers
Function
pytest_configure
(config: Config)
src/_pytest/mark/__init__.py:268
↓ 2 callers
Method
pytest_exception_interact
( self, node: Node, call: "CallInfo[Any]", report: BaseReport )
src/_pytest/debugging.py:286
↓ 2 callers
Method
pytest_make_collect_report
(self, collector: Collector)
src/_pytest/capture.py:764
↓ 2 callers
Method
pytest_runtest_logreport
( self, report: Union[TestReport, CollectReport] )
src/_pytest/main.py:517
↓ 2 callers
Method
pytest_runtest_logstart
(self)
src/_pytest/logging.py:685
↓ 2 callers
Function
pytest_runtest_setup
(item: Item)
src/_pytest/skipping.py:235
↓ 2 callers
Method
raise_exc
(self, *args)
testing/io/test_saferepr.py:74
↓ 2 callers
Function
raises
( expected_exception: Union[Type[E], Tuple[Type[E], ...]], *, match: Optional[Union[str, Pattern[s
src/_pytest/python_api.py:757
↓ 2 callers
Function
register_cleanup_lock_removal
Register a cleanup function for removing a lock, by default on atexit.
src/_pytest/pathlib.py:247
↓ 2 callers
Method
reject
(self, expected: Sequence[TokenType])
src/_pytest/mark/expression.py:120
↓ 2 callers
Method
report_collect
(self, final: bool = False)
src/_pytest/terminal.py:643
↓ 2 callers
Method
repr_failure
Return a representation of a collection or test failure. .. seealso:: :ref:`non-python tests` :param excinfo: Exception information
src/_pytest/nodes.py:484
↓ 2 callers
Method
restore
(self)
src/_pytest/pytester.py:629
↓ 2 callers
Method
resume
(self)
src/_pytest/capture.py:429
↓ 2 callers
Method
resume_capturing
(self)
src/_pytest/capture.py:569
↓ 2 callers
Method
resume_fixture
(self)
src/_pytest/capture.py:724
↓ 2 callers
Method
rewrite
Rewinds the terminal cursor to the beginning and writes the given line. :param erase: If True, will also add spaces until the ful
src/_pytest/terminal.py:425
↓ 2 callers
Function
rewrite_asserts
Rewrite the assert statements in mod.
src/_pytest/assertion/rewrite.py:419
↓ 2 callers
Function
safe_isclass
Ignore any exception via isinstance on Python 3.
src/_pytest/compat.py:334
↓ 2 callers
Function
safeformat
Return a pretty printed string for the given object. Failing __repr__ functions of user instances will be represented with a short exception
src/_pytest/_io/saferepr.py:81
↓ 2 callers
Method
set_repr_style
(self, mode: "Literal['short', 'long']")
src/_pytest/_code/code.py:209
↓ 2 callers
Method
setup_conftest_and_foo
Setup a tests folder to be used to test if modules in that folder can be imported due to side-effects of --import-mode or not.
testing/test_collection.py:1441
↓ 2 callers
Function
setup_crashing_test
(pytester: Pytester)
testing/test_faulthandler.py:22
↓ 2 callers
Function
showversion
(config: Config)
src/_pytest/helpconfig.py:131
↓ 2 callers
Function
sleep
()
testing/plugins_integration/pytest_twisted_integration.py:5
↓ 2 callers
Method
snap
(self)
src/_pytest/capture.py:397
↓ 2 callers
Method
spawn
Run a command using pexpect. The pexpect child is returned.
src/_pytest/pytester.py:1490
↓ 2 callers
Method
spy_factory
(self)
testing/test_pytester.py:229
↓ 2 callers
Method
suspend
(self)
src/_pytest/capture.py:421
↓ 2 callers
Method
suspend_capturing
(self, in_: bool = False)
src/_pytest/capture.py:559
↓ 2 callers
Method
suspend_fixture
(self)
src/_pytest/capture.py:720
← previous
next →
501–600 of 4,602, ranked by callers