fname stringlengths 63 176 | rel_fname stringclasses 706
values | line int64 -1 4.5k | name stringlengths 1 81 | kind stringclasses 2
values | category stringclasses 2
values | info stringlengths 0 77.9k ⌀ |
|---|---|---|---|---|---|---|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py | src/_pytest/compat.py | 248 | _bytes_to_ascii | ref | function | ret = _bytes_to_ascii(val)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py | src/_pytest/compat.py | 250 | decode | ref | function | ret = val.encode("unicode_escape").decode("ascii")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py | src/_pytest/compat.py | 251 | _translate_non_printable | ref | function | return _translate_non_printable(ret)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py | src/_pytest/compat.py | 255 | _PytestWrapper | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py | src/_pytest/compat.py | 266 | get_real_func | def | function | def get_real_func(obj):
"""Get the real function object of the (possibly) wrapped object by
functools.wraps or functools.partial."""
start_obj = obj
for i in range(100):
# __pytest_wrapped__ is set by @pytest.fixture when wrapping the fixture function
# to trigger a warning if it gets ca... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py | src/_pytest/compat.py | 287 | saferepr | ref | function | start=saferepr(start_obj), current=saferepr(obj)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py | src/_pytest/compat.py | 287 | saferepr | ref | function | start=saferepr(start_obj), current=saferepr(obj)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py | src/_pytest/compat.py | 295 | get_real_method | def | function | def get_real_method(obj, holder):
"""Attempt to obtain the real function object that might be wrapping
``obj``, while at the same time returning a bound method to ``holder`` if
the original object was a bound method."""
try:
is_method = hasattr(obj, "__func__")
obj = get_real_func(obj)
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py | src/_pytest/compat.py | 301 | get_real_func | ref | function | obj = get_real_func(obj)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py | src/_pytest/compat.py | 309 | getimfunc | def | function | def getimfunc(func):
try:
return func.__func__
except AttributeError:
return func
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py | src/_pytest/compat.py | 316 | safe_getattr | def | function | def safe_getattr(object: Any, name: str, default: Any) -> Any:
"""Like getattr but return default upon any Exception or any OutcomeException.
Attribute access can potentially fail for 'evil' Python objects.
See issue #214.
It catches OutcomeException because of #2490 (issue #580), new outcomes
are ... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py | src/_pytest/compat.py | 333 | safe_isclass | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py | src/_pytest/compat.py | 380 | func | ref | function | value = instance.__dict__[self.func.__name__] = self.func(instance)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/compat.py | src/_pytest/compat.py | 415 | assert_never | def | function | def assert_never(value: "NoReturn") -> "NoReturn":
assert _False, f"Unhandled value: {value} ({type(value).__name__})"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 78 | HookimplMarker | ref | function | hookimpl = HookimplMarker("pytest")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 79 | HookspecMarker | ref | function | hookspec = HookspecMarker("pytest")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 83 | ExitCode | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 105 | ConftestImportFailure | def | class | __init__ __str__ |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 121 | filter_traceback_for_conftest_import_failure | def | function | def filter_traceback_for_conftest_import_failure(
entry: _pytest._code.TracebackEntry,
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 129 | filter_traceback | ref | function | return filter_traceback(entry) and "importlib" not in str(entry.path).split(os.sep)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 132 | main | def | function | def main(
args: Optional[Union[List[str], "os.PathLike[str]"]] = None,
plugins: Optional[Sequence[Union[str, _PluggyPlugin]]] = None,
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 145 | _prepareconfig | ref | function | config = _prepareconfig(args, plugins)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 147 | from_exc_info | ref | function | exc_info = ExceptionInfo.from_exc_info(e.excinfo)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 148 | TerminalWriter | ref | function | tw = TerminalWriter(sys.stderr)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 149 | line | ref | function | tw.line(f"ImportError while loading conftest '{e.path}'.", red=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 154 | getrepr | ref | function | exc_info.getrepr(style="short", chain=False)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 156 | exconly | ref | function | else exc_info.exconly()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 160 | line | ref | function | tw.line(line.rstrip(), red=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 164 | pytest_cmdline_main | ref | function | ret: Union[ExitCode, int] = config.hook.pytest_cmdline_main(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 168 | ExitCode | ref | function | return ExitCode(ret)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 172 | _ensure_unconfigure | ref | function | config._ensure_unconfigure()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 174 | TerminalWriter | ref | function | tw = TerminalWriter(sys.stderr)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 176 | line | ref | function | tw.line(f"ERROR: {msg}\n", red=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 180 | console_main | def | function | def console_main() -> int:
"""The CLI entry point of pytest.
This function is not meant for programmable use; use `main()` instead.
"""
# https://docs.python.org/3/library/signal.html#note-on-sigpipe
try:
code = main()
sys.stdout.flush()
return code
except BrokenPipeErro... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 187 | main | ref | function | code = main()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 198 | cmdline | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 202 | filename_arg | def | function | def filename_arg(path: str, optname: str) -> str:
"""Argparse type validator for filename arguments.
:path: Path of filename.
:optname: Name of the option.
"""
if os.path.isdir(path):
raise UsageError(f"{optname} must be a filename, given: {path}")
return path
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 208 | isdir | ref | function | if os.path.isdir(path):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 209 | UsageError | ref | function | raise UsageError(f"{optname} must be a filename, given: {path}")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 213 | directory_arg | def | function | def directory_arg(path: str, optname: str) -> str:
"""Argparse type validator for directory arguments.
:path: Path of directory.
:optname: Name of the option.
"""
if not os.path.isdir(path):
raise UsageError(f"{optname} must be a directory, given: {path}")
return path
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 219 | isdir | ref | function | if not os.path.isdir(path):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 220 | UsageError | ref | function | raise UsageError(f"{optname} must be a directory, given: {path}")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 267 | get_config | def | function | def get_config(
args: Optional[List[str]] = None,
plugins: Optional[Sequence[Union[str, _PluggyPlugin]]] = None,
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 272 | PytestPluginManager | ref | function | pluginmanager = PytestPluginManager()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 273 | Config | ref | function | config = Config(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 275 | InvocationParams | ref | function | invocation_params=Config.InvocationParams(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 284 | consider_preparse | ref | function | pluginmanager.consider_preparse(args, exclude_only=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 287 | import_plugin | ref | function | pluginmanager.import_plugin(spec)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 292 | get_plugin_manager | def | function | def get_plugin_manager() -> "PytestPluginManager":
"""Obtain a new instance of the
:py:class:`pytest.PytestPluginManager`, with default plugins
already loaded.
This function can be used by integration with other tools, like hooking
into pytest to run tests into an IDE.
"""
return get_config... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 300 | get_config | ref | function | return get_config().pluginmanager
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 303 | _prepareconfig | def | function | def _prepareconfig(
args: Optional[Union[List[str], "os.PathLike[str]"]] = None,
plugins: Optional[Sequence[Union[str, _PluggyPlugin]]] = None,
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 315 | get_config | ref | function | config = get_config(args, plugins)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 321 | consider_pluginarg | ref | function | pluginmanager.consider_pluginarg(plugin)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 323 | register | ref | function | pluginmanager.register(plugin)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 324 | pytest_cmdline_parse | ref | function | config = pluginmanager.hook.pytest_cmdline_parse(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 329 | _ensure_unconfigure | ref | function | config._ensure_unconfigure()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 334 | PytestPluginManager | def | class | __init__ parse_hookimpl_opts parse_hookspec_opts register getplugin hasplugin pytest_configure _set_initial_conftests _try_load_conftest _getconftestmodules _rget_with_confmod _importconftest _check_non_top_pytest_plugins consider_preparse consider_pluginarg consider_conftest consider_env consider_module _import_plugin... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 364 | add_hookspecs | ref | function | self.add_hookspecs(_pytest.hookspec)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 365 | register | ref | function | self.register(self)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 378 | setwriter | ref | function | self.trace.root.setwriter(err.write)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 379 | enable_tracing | ref | function | self.enable_tracing()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 382 | DummyRewriteHook | ref | function | self.rewrite_hook = _pytest.assertion.DummyRewriteHook()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 386 | parse_hookimpl_opts | def | function | def parse_hookimpl_opts(self, plugin: _PluggyPlugin, name: str):
# pytest hooks are always prefixed with "pytest_",
# so we avoid accessing possibly non-readable attributes
# (see issue #1073).
if not name.startswith("pytest_"):
return
# Ignore names which can not... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 397 | parse_hookimpl_opts | ref | function | opts = super().parse_hookimpl_opts(plugin, name)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 415 | parse_hookspec_opts | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 416 | parse_hookspec_opts | ref | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 432 | register | def | function | def register(
self, plugin: _PluggyPlugin, name: Optional[str] = None
) -> Optional[str]:
if name in _pytest.deprecated.DEPRECATED_EXTERNAL_PLUGINS:
warnings.warn(
PytestConfigWarning(
"{} plugin has been merged into the core, "
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 437 | PytestConfigWarning | ref | function | PytestConfigWarning(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 445 | register | ref | function | ret: Optional[str] = super().register(plugin, name)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 447 | call_historic | ref | function | self.hook.pytest_plugin_registered.call_historic(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 452 | consider_module | ref | function | self.consider_module(plugin)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 455 | getplugin | def | function | def getplugin(self, name: str):
# Support deprecated naming because plugins (xdist e.g.) use it.
plugin: Optional[_PluggyPlugin] = self.get_plugin(name)
return plugin
def hasplugin(self, name: str) -> bool:
"""Return whether a plugin with the given name is registered."""
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 457 | get_plugin | ref | function | plugin: Optional[_PluggyPlugin] = self.get_plugin(name)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 460 | hasplugin | def | function | def hasplugin(self, name: str) -> bool:
"""Return whether a plugin with the given name is registered."""
return bool(self.get_plugin(name))
def pytest_configure(self, config: "Config") -> None:
""":meta private:"""
# XXX now that the pluginmanager exposes hookimpl(tryfirst...)
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 462 | get_plugin | ref | function | return bool(self.get_plugin(name))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 464 | pytest_configure | def | function | def pytest_configure(self, config: "Config") -> None:
""":meta private:"""
# XXX now that the pluginmanager exposes hookimpl(tryfirst...)
# we should remove tryfirst/trylast as markers.
config.addinivalue_line(
"markers",
"tryfirst: mark a hook implementation ... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 468 | addinivalue_line | ref | function | config.addinivalue_line(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 473 | addinivalue_line | ref | function | config.addinivalue_line(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 483 | _set_initial_conftests | def | function | def _set_initial_conftests(
self, namespace: argparse.Namespace, rootpath: Path
) -> None:
"""Load initial conftest files given a preparsed "namespace".
As conftest files may add their own command line options which have
arguments ('--my-opt somepath') we might get some false po... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 495 | absolutepath | ref | function | absolutepath(current / namespace.confcutdir)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 509 | absolutepath | ref | function | anchor = absolutepath(current / path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 511 | _try_load_conftest | ref | function | self._try_load_conftest(anchor, namespace.importmode, rootpath)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 514 | _try_load_conftest | ref | function | self._try_load_conftest(current, namespace.importmode, rootpath)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 516 | _try_load_conftest | def | function | def _try_load_conftest(
self, anchor: Path, importmode: Union[str, ImportMode], rootpath: Path
) -> None:
self._getconftestmodules(anchor, importmode, rootpath)
# let's also consider test* subdirs
if anchor.is_dir():
for x in anchor.glob("test*"):
if x... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 519 | _getconftestmodules | ref | function | self._getconftestmodules(anchor, importmode, rootpath)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 524 | _getconftestmodules | ref | function | self._getconftestmodules(x, importmode, rootpath)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 526 | _getconftestmodules | def | function | def _getconftestmodules(
self, path: Path, importmode: Union[str, ImportMode], rootpath: Path
) -> List[types.ModuleType]:
if self._noconftest:
return []
if path.is_file():
directory = path.parent
else:
directory = path
# Optimization... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 553 | _importconftest | ref | function | mod = self._importconftest(conftestpath, importmode, rootpath)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 558 | _rget_with_confmod | def | function | def _rget_with_confmod(
self,
name: str,
path: Path,
importmode: Union[str, ImportMode],
rootpath: Path,
) -> Tuple[types.ModuleType, Any]:
modules = self._getconftestmodules(path, importmode, rootpath=rootpath)
for mod in reversed(modules):
tr... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 565 | _getconftestmodules | ref | function | modules = self._getconftestmodules(path, importmode, rootpath=rootpath)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 573 | _importconftest | def | function | def _importconftest(
self, conftestpath: Path, importmode: Union[str, ImportMode], rootpath: Path
) -> types.ModuleType:
# Use a resolved Path object as key to avoid loading the same conftest
# twice with build systems that create build directories containing
# symlinks to actual... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 586 | resolve_package_path | ref | function | pkgpath = resolve_package_path(conftestpath)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 588 | _ensure_removed_sysmodule | ref | function | _ensure_removed_sysmodule(conftestpath.stem)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 591 | import_path | ref | function | mod = import_path(conftestpath, mode=importmode, root=rootpath)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 595 | ConftestImportFailure | ref | function | raise ConftestImportFailure(conftestpath, exc_info) from e
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 597 | _check_non_top_pytest_plugins | ref | function | self._check_non_top_pytest_plugins(mod, conftestpath)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 608 | consider_conftest | ref | function | self.consider_conftest(mod)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 611 | _check_non_top_pytest_plugins | def | function | def _check_non_top_pytest_plugins(
self,
mod: types.ModuleType,
conftestpath: Path,
) -> None:
if (
hasattr(mod, "pytest_plugins")
and self._configured
and not self._using_pyargs
):
msg = (
"Defining 'pytest_... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 630 | fail | ref | function | fail(msg.format(conftestpath, self._confcutdir), pytrace=False)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 637 | consider_preparse | def | function | def consider_preparse(
self, args: Sequence[str], *, exclude_only: bool = _False
) -> None:
""":meta private:"""
i = 0
n = len(args)
while i < n:
opt = args[i]
i += 1
if isinstance(opt, str):
if opt == "-p":
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.