MCPcopy Create free account

hub / github.com/pytest-dev/pytest / functions

Functions4,602 in github.com/pytest-dev/pytest

↓ 13 callersMethodwrite_sep
( self, sep: str, title: Optional[str] = None, fullwidth: Optional[int] = None
src/_pytest/terminal.py:443
↓ 12 callersMethodaddfinalizer
Register a function to be called when this node is finalized. This method can only be called when this node is active in a setup chai
src/_pytest/nodes.py:409
↓ 12 callersFunctiondetermine_setup
( inifile: Optional[str], args: Sequence[str], rootdir_cmd_arg: Optional[str] = None, config:
src/_pytest/config/findpaths.py:170
↓ 12 callersMethodfrom_function
(cls, obj: object)
src/_pytest/_code/code.py:69
↓ 12 callersMethodget
(self, key)
testing/test_tmpdir.py:42
↓ 12 callersFunctionload_config_dict_from_file
Load pytest configuration from the given file path, if supported. Return None if the file does not contain valid pytest configuration.
src/_pytest/config/findpaths.py:35
↓ 12 callersMethodparseoutcomes
Return a dictionary of outcome noun -> count from parsing the terminal output that the test process produced. The returned nouns will
src/_pytest/pytester.py:555
↓ 12 callersMethodtrace
(self)
testing/test_tmpdir.py:39
↓ 11 callersMethod_from_json
Create either a TestReport or CollectReport, depending on the calling class. It is the callers responsibility to know which class to pass her
src/_pytest/reports.py:216
↓ 11 callersMethodfnmatch_lines_random
Check lines exist in the output in any order (using :func:`python:fnmatch.fnmatch`).
src/_pytest/pytester.py:1554
↓ 11 callersMethodfrom_parent
(cls, parent, *, name, x)
testing/test_collection.py:1397
↓ 11 callersMethodgetfailedcollections
(self)
src/_pytest/pytester.py:416
↓ 11 callersFunctiongetfuncargnames
Return the names of a function's mandatory arguments. Should return the names of all function arguments that: * Aren't bound to an instance o
src/_pytest/compat.py:119
↓ 11 callersMethodgetparent
Get the next parent node (including self) which is an instance of the given class.
src/_pytest/nodes.py:417
↓ 11 callersMethodlistchain
Return list of all parent collectors up to self, starting from the root of collection tree.
src/_pytest/nodes.py:327
↓ 11 callersMethodset
Save value for the given key. :param key: Must be a ``/`` separated value. Usually the first name is the name of your
src/_pytest/cacheprovider.py:165
↓ 11 callersMethodsyspath_prepend
Prepend ``path`` to ``sys.path`` list of import locations.
src/_pytest/monkeypatch.py:313
↓ 10 callersMethod_addoption
(self, *optnames: str, **attrs: Any)
src/_pytest/config/argparsing.py:373
↓ 10 callersMethodcontext
Context manager that returns a new :class:`MonkeyPatch` object which undoes any patching done inside the ``with`` block upon exit. Ex
src/_pytest/monkeypatch.py:133
↓ 10 callersFunctionevaluate_skip_marks
Evaluate skip and skipif marks on item, returning Skip if triggered.
src/_pytest/skipping.py:167
↓ 10 callersMethodfilter
Ignore warnings about missing include with "only" directive. Ref: https://github.com/sphinx-doc/sphinx/issues/2150.
doc/en/conf.py:407
↓ 10 callersFunctionget_real_func
Get the real function object of the (possibly) wrapped object by functools.wraps or functools.partial.
src/_pytest/compat.py:267
↓ 10 callersMethodset_when
(self, when: str)
src/_pytest/logging.py:826
↓ 10 callersMethodsetdefault
Return the value of key if already set, otherwise set the value of key to default and return default.
src/_pytest/stash.py:90
↓ 10 callersMethodsetup
(self)
src/_pytest/nodes.py:321
↓ 10 callersMethodsuspend_global_capture
(self, in_: bool = False)
src/_pytest/capture.py:676
↓ 10 callersMethodtime
(self)
testing/conftest.py:204
↓ 9 callersMethod_getconftestmodules
( self, path: Path, importmode: Union[str, ImportMode], rootpath: Path )
src/_pytest/config/__init__.py:541
↓ 9 callersFunctionbin_xml_escape
r"""Visually escape invalid XML characters. For example, transforms 'hello\aworld\b' into 'hello#x07world#x08' Note that
src/_pytest/junitxml.py:40
↓ 9 callersMethoddone
Stop capturing, restore streams, return original capture file, seeked to position zero.
src/_pytest/capture.py:405
↓ 9 callersFunctionensure_file
Ensure that file exists
testing/test_collection.py:21
↓ 9 callersFunctionfnmatch_ex
A port of FNMatcher from py.path.common which works with PurePath() instances. The difference between this algorithm and PurePath.match() is that
src/_pytest/pathlib.py:388
↓ 9 callersFunctiongetfslineno
Return source location (path, lineno) for the given object. If the source cannot be determined return ("", -1). The line number is 0-based.
src/_pytest/_code/code.py:1202
↓ 9 callersMethodstart
Start capturing on targetfd using memorized tmpfile.
src/_pytest/capture.py:390
↓ 9 callersMethodstop_capturing
Stop capturing and reset capturing streams.
src/_pytest/capture.py:579
↓ 9 callersFunctionsymlink_or_skip
Make a symlink, or skip the test in case symlinks are not supported.
src/_pytest/pathlib.py:429
↓ 9 callersMethodwrite
(self, content: str, *, flush: bool = False, **markup: bool)
src/_pytest/terminal.py:413
↓ 8 callersMethod_assert_state
(self, op: str, states: Tuple[str, ...])
src/_pytest/capture.py:383
↓ 8 callersMethod_ensure_unconfigure
(self)
src/_pytest/config/__init__.py:994
↓ 8 callersMethodadd_cleanup
Add a function to be called when the config object gets out of use (usually coinciding with pytest_unconfigure).
src/_pytest/config/__init__.py:982
↓ 8 callersFunctionf
()
testing/test_runner.py:701
↓ 8 callersMethodfind_spec
( self, name: str, path: Optional[Sequence[Union[str, bytes]]] = None, target:
src/_pytest/assertion/rewrite.py:83
↓ 8 callersMethodfrom_config
(cls, config: Config)
src/_pytest/main.py:484
↓ 8 callersMethodfrom_exc_info
Return an ExceptionInfo for an existing exc_info tuple. .. warning:: Experimental API :param exprinfo: A te
src/_pytest/_code/code.py:469
↓ 8 callersFunctiong
(arg)
testing/python/fixtures.py:25
↓ 8 callersMethodgetbasetemp
Return the base temporary directory, creating it if needed.
src/_pytest/tmpdir.py:102
↓ 8 callersMethodgetfixturevalue
Dynamically run a named fixture function. Declaring fixtures via function argument is recommended where possible. But if you can only
src/_pytest/fixtures.py:580
↓ 8 callersMethodimport_plugin
Import a plugin with ``modname``. If ``consider_entry_points`` is True, entry point names are also considered to find a plugin.
src/_pytest/config/__init__.py:718
↓ 8 callersMethodmktemp
Create a new temporary directory managed by the factory. :param basename: Directory base name, must be a relative path.
src/_pytest/tmpdir.py:78
↓ 8 callersMethodperform_collect
( self, args: Optional[Sequence[str]] = ..., genitems: "Literal[True]" = ... )
src/_pytest/main.py:592
↓ 8 callersMethodread
(self, *args)
src/_pytest/capture.py:191
↓ 8 callersMethodrunpython
Run a python script using sys.executable as interpreter.
src/_pytest/pytester.py:1440
↓ 8 callersMethodteardown_exact
Teardown the current stack up until reaching nodes that nextitem also descends from. When nextitem is None (meaning we're at the last
src/_pytest/runner.py:513
↓ 7 callersFunction_idval
( val: object, argname: str, idx: int, idfn: Optional[Callable[[Any], Optional[object]]],
src/_pytest/python.py:1363
↓ 7 callersMethodaddinivalue_line
Add a line to an ini-file option. The option must have been declared but might not yet be set in which case the line becomes the first
src/_pytest/config/__init__.py:1361
↓ 7 callersFunctionassert_never
(value: "NoReturn")
src/_pytest/compat.py:416
↓ 7 callersMethodconsider_preparse
:meta private:
src/_pytest/config/__init__.py:649
↓ 7 callersMethoddumps
(self, obj)
doc/en/example/multipython.py:32
↓ 7 callersFunctionevaluate
(input: str, matcher: Callable[[str], bool])
testing/test_mark_expression.py:8
↓ 7 callersMethodexconly
Return the exception as a string. When 'tryshort' resolves to True, and the exception is an AssertionError, only the actual exception
src/_pytest/_code/code.py:577
↓ 7 callersMethodflush
(self)
src/_pytest/terminal.py:416
↓ 7 callersMethodget_write_msg
(self, idx)
testing/conftest.py:96
↓ 7 callersMethodgetlines
()
testing/io/test_terminalwriter.py:75
↓ 7 callersMethodgetsource
Return failing source code.
src/_pytest/_code/code.py:244
↓ 7 callersFunctionmake_numbered_dir
Create a directory with an increased number as suffix for the given prefix.
src/_pytest/pathlib.py:209
↓ 7 callersMethodreportinfo
Get location information for this item for test reports. Returns a tuple with three elements: - The path of the test (default ``self
src/_pytest/nodes.py:726
↓ 7 callersMethodrepr_traceback_entry
( self, entry: TracebackEntry, excinfo: Optional[ExceptionInfo[BaseException]] = None,
src/_pytest/_code/code.py:802
↓ 7 callersMethodset_level
Set the level of a logger for the duration of a test. .. versionchanged:: 3.4 The levels of the loggers changed by this function
src/_pytest/logging.py:441
↓ 6 callersMethod_assert_state
(self, op: str, states: Tuple[str, ...])
src/_pytest/capture.py:262
↓ 6 callersMethod_do_configure
(self)
src/_pytest/config/__init__.py:987
↓ 6 callersMethod_importconftest
( self, conftestpath: Path, importmode: Union[str, ImportMode], rootpath: Path )
src/_pytest/config/__init__.py:585
↓ 6 callersMethodassign
Give *expr* a name.
src/_pytest/assertion/rewrite.py:774
↓ 6 callersFunctioncheck_call
(*args, **kwargs)
testing/test_unittest.py:1182
↓ 6 callersMethodclear
(self)
src/_pytest/pytester.py:458
↓ 6 callersMethodcollect
(self)
testing/example_scripts/fixtures/custom_item/conftest.py:10
↓ 6 callersFunctionconftest_setinitial
( conftest: PytestPluginManager, args, confcutdir: Optional["os.PathLike[str]"] = None )
testing/test_conftest.py:26
↓ 6 callersFunctioncreate_cleanup_lock
Create a lock to prevent premature folder cleanup.
src/_pytest/pathlib.py:230
↓ 6 callersMethoddelattr
Delete attribute ``name`` from ``target``. If no ``name`` is specified and ``target`` is a string it will be interpreted as a dotted
src/_pytest/monkeypatch.py:226
↓ 6 callersMethodexplanation_param
Return a new named %-formatting placeholder for expr. This creates a %-formatting placeholder for expr in the current formatting cont
src/_pytest/assertion/rewrite.py:795
↓ 6 callersFunctionf
()
testing/code/test_excinfo.py:60
↓ 6 callersMethodfileno
(self)
src/_pytest/capture.py:203
↓ 6 callersMethodfilter
Return a Traceback instance with certain items removed fn is a function that gets a single argument, a TracebackEntry instance, and s
src/_pytest/_code/code.py:397
↓ 6 callersMethodfoo
()
testing/python/fixtures.py:3624
↓ 6 callersMethodformat_for_fnmatch
Replace color names for use with LineMatcher.fnmatch_lines
testing/conftest.py:169
↓ 6 callersFunctionfunc
()
src/_pytest/doctest.py:571
↓ 6 callersMethodgethookproxy
(self, fspath: "os.PathLike[str]")
src/_pytest/main.py:533
↓ 6 callersMethodgetstatementrange
Return (start, end) tuple which spans the minimal statement region which containing the given lineno.
src/_pytest/_code/source.py:96
↓ 6 callersMethodmakepyprojecttoml
Write a pyproject.toml file with 'source' as contents. .. versionadded:: 6.0
src/_pytest/pytester.py:845
↓ 6 callersMethodparse_args
Allow splitting of positional arguments.
src/_pytest/config/argparsing.py:417
↓ 6 callersMethodpytest_sessionfinish
(self)
src/_pytest/junitxml.py:643
↓ 6 callersMethodpytest_sessionstart
(self)
src/_pytest/junitxml.py:640
↓ 6 callersMethodread_global_capture
(self)
src/_pytest/capture.py:689
↓ 6 callersMethodrepr_traceback
(self, excinfo: ExceptionInfo[BaseException])
src/_pytest/_code/code.py:848
↓ 6 callersFunctionresolve_collection_argument
Parse path arguments optionally containing selection parts and return (fspath, names). Command-line arguments can point to files and/or directori
src/_pytest/main.py:849
↓ 6 callersMethodrestore
(self)
src/_pytest/pytester.py:638
↓ 6 callersMethodresume_global_capture
(self)
src/_pytest/capture.py:670
↓ 6 callersFunctionrm_rf
Remove the path contents recursively, even if some elements are read-only.
src/_pytest/pathlib.py:147
↓ 6 callersFunctionruntestprotocol
( item: Item, log: bool = True, nextitem: Optional[Item] = None )
src/_pytest/runner.py:118
↓ 6 callersFunctionsafe_getattr
Like getattr but return default upon any Exception or any OutcomeException. Attribute access can potentially fail for 'evil' Python objects.
src/_pytest/compat.py:317
↓ 6 callersMethodstart_capturing
(self)
src/_pytest/capture.py:541
← previousnext →101–200 of 4,602, ranked by callers