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
_check_record_param_type
Used by record_testsuite_property to check that the given parameter name is of the proper type.
src/_pytest/junitxml.py:333
↓ 2 callers
Method
_check_scope
( self, argname: str, invoking_scope: Scope, requested_scope: Scope, )
src/_pytest/fixtures.py:703
↓ 2 callers
Function
_compare_eq_any
(left: Any, right: Any, verbose: int = 0)
src/_pytest/assertion/util.py:178
↓ 2 callers
Function
_diff_text
Return the explanation for the diff between text. Unless --verbose is used this will skip leading and trailing characters which are identical
src/_pytest/assertion/util.py:215
↓ 2 callers
Method
_do_cleanup
(self, tmp_path: Path)
testing/test_tmpdir.py:278
↓ 2 callers
Function
_ellipsize
(s: str, maxsize: int)
src/_pytest/_io/saferepr.py:30
↓ 2 callers
Method
_ensure_basetemp
( self, args: Sequence[Union[str, "os.PathLike[str]"]] )
src/_pytest/pytester.py:1181
↓ 2 callers
Function
_fill_fixtures_impl
Internal implementation to fill fixtures on the given function object.
src/_pytest/fixtures.py:369
↓ 2 callers
Method
_finalize
Clean up global state artifacts. Some methods modify the global interpreter state and this tries to clean this up. It does n
src/_pytest/pytester.py:730
↓ 2 callers
Function
_find_parametrized_scope
Find the most appropriate scope for a parametrized call based on its arguments. When there's at least one direct argument, always use "function"
src/_pytest/python.py:1318
↓ 2 callers
Function
_folded_skips
( startpath: Path, skipped: Sequence[CollectReport], )
src/_pytest/terminal.py:1300
↓ 2 callers
Function
_format_args
(func: Callable[..., Any])
src/_pytest/compat.py:59
↓ 2 callers
Function
_get_allow_bytes_flag
Register and return the ALLOW_BYTES flag.
src/_pytest/doctest.py:699
↓ 2 callers
Function
_get_allow_unicode_flag
Register and return the ALLOW_UNICODE flag.
src/_pytest/doctest.py:692
↓ 2 callers
Function
_get_assertion_exprs
Return a mapping from {lineno: "assertion test expression"}.
src/_pytest/assertion/rewrite.py:558
↓ 2 callers
Method
_get_auto_indent
Determine the current auto indentation setting. Specify auto indent behavior (on/off/fixed) by passing in extra={"auto_indent": [valu
src/_pytest/logging.py:122
↓ 2 callers
Function
_get_continue_on_failure
(config)
src/_pytest/doctest.py:404
↓ 2 callers
Method
_get_fixturestack
(self)
src/_pytest/fixtures.py:614
↓ 2 callers
Function
_get_line_with_reprcrash_message
Get summary line for a report, trying to add reprcrash message.
src/_pytest/terminal.py:1276
↓ 2 callers
Function
_get_maxsize_for_saferepr
Get `maxsize` configuration for saferepr based on the given config object.
src/_pytest/assertion/rewrite.py:443
↓ 2 callers
Function
_get_number_flag
Register and return the NUMBER flag.
src/_pytest/doctest.py:706
↓ 2 callers
Function
_get_plugin_specs_as_list
Parse a plugins specification into a list of plugin names.
src/_pytest/config/__init__.py:756
↓ 2 callers
Method
_get_reports_to_display
Get test/collection reports for the given status key, such as `passed` or `error`.
src/_pytest/terminal.py:1189
↓ 2 callers
Function
_get_runner
( checker: Optional["doctest.OutputChecker"] = None, verbose: Optional[bool] = None, optionflags:
src/_pytest/doctest.py:229
↓ 2 callers
Method
_get_unknown_ini_keys
(self)
src/_pytest/config/__init__.py:1289
↓ 2 callers
Method
_getconftest_pathlist
( self, name: str, path: Path, rootpath: Path )
src/_pytest/config/__init__.py:1442
↓ 2 callers
Method
_getentrysource
(self, entry: TracebackEntry)
src/_pytest/_code/code.py:717
↓ 2 callers
Method
_getscopeitem
( self, scope: Union[Scope, "_ScopeName"] )
src/_pytest/fixtures.py:735
↓ 2 callers
Method
_handle_teardown_sections
(self, nodeid: str)
src/_pytest/terminal.py:968
↓ 2 callers
Function
_imply_path
( node_type: Type["Node"], path: Optional[Path], fspath: Optional[LEGACY_PATH], )
src/_pytest/nodes.py:104
↓ 2 callers
Method
_import_plugin_specs
( self, spec: Union[None, types.ModuleType, str, Sequence[str]] )
src/_pytest/config/__init__.py:711
↓ 2 callers
Function
_in_venv
Attempt to detect if ``path`` is the root of a Virtual Environment by checking for the existence of the appropriate activate script.
src/_pytest/main.py:355
↓ 2 callers
Method
_initrequest
(self)
src/_pytest/python.py:1693
↓ 2 callers
Method
_inject_setup_class_fixture
Inject a hidden autouse, class scoped fixture into the collected class object that invokes setup_class/teardown_class if either or both are av
src/_pytest/python.py:824
↓ 2 callers
Method
_is_capturing
(cls, capman: Optional["CaptureManager"])
src/_pytest/debugging.py:106
↓ 2 callers
Function
_is_main_py
(path: Path)
src/_pytest/doctest.py:153
↓ 2 callers
Method
_is_marked_for_rewrite
(self, name: str, state: "AssertionState")
src/_pytest/assertion/rewrite.py:233
↓ 2 callers
Function
_is_mocked
Return if an object is possibly a mock object by checking the existence of a highly improbable attribute.
src/_pytest/doctest.py:455
↓ 2 callers
Function
_iter_rewritable_modules
Given an iterable of file names in a source distribution, return the "names" that should be marked for assertion rewrite. For example the pac
src/_pytest/config/__init__.py:793
↓ 2 callers
Method
_locationline
( self, nodeid: str, fspath: str, lineno: Optional[int], domain: str )
src/_pytest/terminal.py:848
↓ 2 callers
Method
_log_cli_enabled
Return whether live logging is enabled.
src/_pytest/logging.py:639
↓ 2 callers
Method
_makepath
(self, path: Union[Path, str])
src/_pytest/_code/code.py:838
↓ 2 callers
Method
_match_lines
Underlying implementation of ``fnmatch_lines`` and ``re_match_lines``. :param Sequence[str] lines2: List of string patterns to ma
src/_pytest/pytester.py:1632
↓ 2 callers
Method
_match_lines_random
( self, lines2: Sequence[str], match_func: Callable[[str, str], bool] )
src/_pytest/pytester.py:1564
↓ 2 callers
Method
_matches_prefix_or_glob_option
Check if the given name matches the prefix or glob-pattern defined in ini configuration.
src/_pytest/python.py:397
↓ 2 callers
Method
_matchfactories
( self, fixturedefs: Iterable[FixtureDef[Any]], nodeid: str )
src/_pytest/fixtures.py:1680
↓ 2 callers
Method
_no_match_line
Ensure captured lines does not have a the given pattern, using ``fnmatch.fnmatch``. :param str pat: The pattern to match lines.
src/_pytest/pytester.py:1717
↓ 2 callers
Function
_parse_expression
(expr: str, exc_message: str)
src/_pytest/mark/__init__.py:256
↓ 2 callers
Function
_patch_unwrap_mock_aware
Context manager which replaces ``inspect.unwrap`` with a version that's aware of mock objects and doesn't recurse into them.
src/_pytest/doctest.py:465
↓ 2 callers
Function
_pformat_dispatch
( object: object, indent: int = 1, width: int = 80, depth: Optional[int] = None, *, co
src/_pytest/_io/saferepr.py:143
↓ 2 callers
Function
_plugin_nameversions
(plugininfo)
src/_pytest/terminal.py:1353
↓ 2 callers
Function
_postmortem_traceback
(excinfo: ExceptionInfo[BaseException])
src/_pytest/debugging.py:367
↓ 2 callers
Function
_pretty_fixture_path
(func)
src/_pytest/python.py:1462
↓ 2 callers
Function
_py36_windowsconsoleio_workaround
Workaround for Windows Unicode console handling on Python>=3.6. Python 3.6 implemented Unicode console handling for Windows. This works by re
src/_pytest/capture.py:71
↓ 2 callers
Function
_remove_ansi_escape_sequences
(text: str)
src/_pytest/logging.py:45
↓ 2 callers
Method
_report_keyboardinterrupt
(self)
src/_pytest/terminal.py:832
↓ 2 callers
Function
_resolve_msg_to_reason
Handles converting the deprecated msg parameter if provided into reason, raising a deprecation warning. This function will be removed wh
src/_pytest/outcomes.py:199
↓ 2 callers
Function
_rewrite_test
Read and rewrite *fn* and return the code object.
src/_pytest/assertion/rewrite.py:357
↓ 2 callers
Method
_set_initial_conftests
Load initial conftest files given a preparsed "namespace". As conftest files may add their own command line options which have argume
src/_pytest/config/__init__.py:498
↓ 2 callers
Method
_set_main_color
(self)
src/_pytest/terminal.py:1155
↓ 2 callers
Function
_show_fixture_action
(fixturedef: FixtureDef[object], msg: str)
src/_pytest/setuponly.py:60
↓ 2 callers
Function
_warn_incompatibility_with_xunit2
Emit a PytestWarning about the given fixture being incompatible with newer xunit revisions.
src/_pytest/junitxml.py:264
↓ 2 callers
Method
_write_report_lines_from_hooks
( self, lines: Sequence[Union[str, Sequence[str]]] )
src/_pytest/terminal.py:709
↓ 2 callers
Method
_write_source
Write lines of source code possibly highlighted. Keeping this private for now because the API is clunky. We should discuss how to evo
src/_pytest/_io/terminalwriter.py:176
↓ 2 callers
Function
a
(x)
testing/code/test_excinfo.py:1438
↓ 2 callers
Method
add_report_section
Add a new report section, similar to what's done internally to add stdout and stderr captured output:: item.add_report_section("c
src/_pytest/nodes.py:709
↓ 2 callers
Method
add_stats
(self, key: str)
src/_pytest/junitxml.py:523
↓ 2 callers
Method
addoption
Add an option to this group. If a shortened version of a long option is specified, it will be suppressed in the help. ``addoption('--
src/_pytest/config/argparsing.py:357
↓ 2 callers
Function
annotated_getattr
(obj: object, name: str, ann: str)
src/_pytest/monkeypatch.py:81
↓ 2 callers
Method
append_collect_error
(self, report: TestReport)
src/_pytest/junitxml.py:212
↓ 2 callers
Method
append_collect_skipped
(self, report: TestReport)
src/_pytest/junitxml.py:217
↓ 2 callers
Method
append_error
(self, report: TestReport)
src/_pytest/junitxml.py:220
↓ 2 callers
Method
append_skipped
(self, report: TestReport)
src/_pytest/junitxml.py:236
↓ 2 callers
Function
apply_warning_filters
Applies pytest-configured filters to the warnings module
src/_pytest/config/__init__.py:1687
↓ 2 callers
Function
assert_approx_raises_regex
(pytestconfig)
testing/python/approx.py:58
↓ 2 callers
Function
assert_color_set
()
testing/io/test_terminalwriter.py:167
↓ 2 callers
Method
assert_contains_lines
Assert that ``lines2`` are contained (linearly) in :attr:`stringio`'s value. Lines are matched using :func:`LineMatcher.fnmatch_lines <pytest
src/_pytest/pytester.py:1512
↓ 2 callers
Method
assert_markers
Assert that given items have expected marker names applied to them. expected should be a dict of (item name -> seq of expected marker names).
testing/test_mark.py:694
↓ 2 callers
Function
attempt_symlink_to
Try to make a symlink from "path" to "to_path", skipping in case this platform does not support it or we don't have sufficient privileges (common
testing/test_tmpdir.py:401
↓ 2 callers
Method
attrs
(self)
src/_pytest/config/argparsing.py:281
↓ 2 callers
Function
callop
(op: str, left: Any, right: Any, verbose: int = 0)
testing/test_assertion.py:325
↓ 2 callers
Function
check
(msg, width, expected)
testing/test_terminal.py:2276
↓ 2 callers
Method
check
(keyword, name)
testing/test_mark.py:774
↓ 2 callers
Method
check_config_args
(self, pytester: Pytester)
testing/test_config.py:696
↓ 2 callers
Method
check_config_linelist
(self, pytester: Pytester)
testing/test_config.py:733
↓ 2 callers
Function
check_interactive_exception
Check whether the call raised an exception that should be reported as interactive.
src/_pytest/runner.py:231
↓ 2 callers
Method
check_output
(self, want: str, got: str, optionflags: int)
src/_pytest/doctest.py:618
↓ 2 callers
Method
check_readme
(self, pytester: Pytester)
testing/test_cacheprovider.py:1179
↓ 2 callers
Method
consider_conftest
:meta private:
src/_pytest/config/__init__.py:699
↓ 2 callers
Function
create_new_paste
Create a new paste using the bpaste.net service. :contents: Paste contents string. :returns: URL to the pasted contents, or an error message.
src/_pytest/pastebin.py:69
↓ 2 callers
Function
create_terminal_writer
Create a TerminalWriter instance configured according to the options in the config object. Every code which requires a TerminalWriter object
src/_pytest/config/__init__.py:1551
↓ 2 callers
Method
cwd_relative_nodeid
(self, nodeid: str)
src/_pytest/config/__init__.py:1053
↓ 2 callers
Function
decorator
(f)
testing/test_compat.py:62
↓ 2 callers
Method
deindent
Return a new Source object deindented.
src/_pytest/_code/source.py:104
↓ 2 callers
Function
derive_importpath
(import_path: str, raising: bool)
src/_pytest/monkeypatch.py:93
↓ 2 callers
Function
ensure_deletable
Check if `path` is deletable based on whether the lock file is expired.
src/_pytest/pathlib.py:292
↓ 2 callers
Function
ensure_extended_length_path
Get the extended-length version of a path (Windows). On Windows, by default, the maximum length of a path (MAX_PATH) is 260 characters, and o
src/_pytest/pathlib.py:117
↓ 2 callers
Function
equal_with_bash
(prefix, ffc, fc, out=None)
testing/test_argcomplete.py:11
↓ 2 callers
Method
errisinstance
Return True if the exception is an instance of exc. Consider using ``isinstance(excinfo.value, exc)`` instead.
src/_pytest/_code/code.py:593
↓ 2 callers
Method
error
Transform argparse error message into UsageError.
src/_pytest/config/argparsing.py:406
← previous
next →
401–500 of 4,602, ranked by callers