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/doctest.py | src/_pytest/doctest.py | 529 | _patch_unwrap_mock_aware | ref | function | with _patch_unwrap_mock_aware():
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 532 | _find | ref | function | super()._find( # type:ignore[misc]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 537 | _importconftest | ref | function | module = self.config.pluginmanager._importconftest(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 539 | getoption | ref | function | self.config.getoption("importmode"),
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 544 | import_path | ref | function | module = import_path(self.path, root=self.config.rootpath)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 546 | getvalue | ref | function | if self.config.getvalue("doctest_ignore_import_errors"):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 547 | skip | ref | function | pytest.skip("unable to import module %r" % self.path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 551 | MockAwareDocTestFinder | ref | function | finder = MockAwareDocTestFinder()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 552 | get_optionflags | ref | function | optionflags = get_optionflags(self)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 553 | _get_runner | ref | function | runner = _get_runner(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 556 | _get_checker | ref | function | checker=_get_checker(),
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 557 | _get_continue_on_failure | ref | function | continue_on_failure=_get_continue_on_failure(self.config),
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 562 | from_parent | ref | function | yield DoctestItem.from_parent(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 567 | _setup_fixtures | def | function | def _setup_fixtures(doctest_item: DoctestItem) -> FixtureRequest:
"""Used by DoctestTextfile and DoctestItem to setup fixture information."""
def func() -> None:
pass
doctest_item.funcargs = {} # type: ignore[attr-defined]
fm = doctest_item.session._fixturemanager
doctest_item._fixtureinf... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 570 | func | def | function | def func() -> None:
pass
doctest_item.funcargs = {} # type: ignore[attr-defined]
fm = doctest_item.session._fixturemanager
doctest_item._fixtureinfo = fm.getfixtureinfo( # type: ignore[attr-defined]
node=doctest_item, func=func, cls=None, funcargs=_False
)
fixture_request = Fi... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 575 | getfixtureinfo | ref | function | doctest_item._fixtureinfo = fm.getfixtureinfo( # type: ignore[attr-defined]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 578 | FixtureRequest | ref | function | fixture_request = FixtureRequest(doctest_item, _ispytest=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 579 | _fillfixtures | ref | function | fixture_request._fillfixtures()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 583 | _init_checker_class | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 587 | LiteralsOutputChecker | def | class | check_output _remove_unwanted_precision |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 617 | check_output | def | function | def check_output(self, want: str, got: str, optionflags: int) -> bool:
if super().check_output(want, got, optionflags):
return _True
allow_unicode = optionflags & _get_allow_unicode_flag()
allow_bytes = optionflags & _get_allow_bytes_flag()
allow_... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 618 | check_output | ref | function | if super().check_output(want, got, optionflags):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 621 | _get_allow_unicode_flag | ref | function | allow_unicode = optionflags & _get_allow_unicode_flag()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 622 | _get_allow_bytes_flag | ref | function | allow_bytes = optionflags & _get_allow_bytes_flag()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 623 | _get_number_flag | ref | function | allow_number = optionflags & _get_number_flag()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 628 | remove_prefixes | def | function | def remove_prefixes(regex: Pattern[str], txt: str) -> str:
return re.sub(regex, r"\1\2", txt)
if allow_unicode:
want = remove_prefixes(self._unicode_literal_re, want)
got = remove_prefixes(self._unicode_literal_re, got)
if allow_bytes... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 632 | remove_prefixes | ref | function | want = remove_prefixes(self._unicode_literal_re, want)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 633 | remove_prefixes | ref | function | got = remove_prefixes(self._unicode_literal_re, got)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 636 | remove_prefixes | ref | function | want = remove_prefixes(self._bytes_literal_re, want)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 637 | remove_prefixes | ref | function | got = remove_prefixes(self._bytes_literal_re, got)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 640 | _remove_unwanted_precision | ref | function | got = self._remove_unwanted_precision(want, got)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 642 | check_output | ref | function | return super().check_output(want, got, optionflags)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 644 | _remove_unwanted_precision | def | function | def _remove_unwanted_precision(self, want: str, got: str) -> str:
wants = list(self._number_re.finditer(want))
gots = list(self._number_re.finditer(got))
if len(wants) != len(gots):
return got
offset = 0
for w, g in zip(wants, gots):
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 658 | approx | ref | function | if float(w.group()) == approx(float(g.group()), abs=10 ** -precision):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 663 | start | ref | function | got[: g.start() + offset] + w.group() + got[g.end() + offset :]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 663 | end | ref | function | got[: g.start() + offset] + w.group() + got[g.end() + offset :]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 665 | end | ref | function | offset += w.end() - w.start() - (g.end() - g.start())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 665 | start | ref | function | offset += w.end() - w.start() - (g.end() - g.start())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 665 | end | ref | function | offset += w.end() - w.start() - (g.end() - g.start())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 665 | start | ref | function | offset += w.end() - w.start() - (g.end() - g.start())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 671 | _get_checker | def | function | def _get_checker() -> "doctest.OutputChecker":
"""Return a doctest.OutputChecker subclass that supports some
additional options:
* ALLOW_UNICODE and ALLOW_BYTES options to ignore u'' and b''
prefixes (respectively) in string literals. Useful when the same
doctest should run in Python 2 and Pyth... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 687 | _init_checker_class | ref | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 688 | CHECKER_CLASS | ref | function | return CHECKER_CLASS()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 691 | _get_allow_unicode_flag | def | function | def _get_allow_unicode_flag() -> int:
"""Register and return the ALLOW_UNICODE flag."""
import doctest
return doctest.register_optionflag("ALLOW_UNICODE")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 695 | register_optionflag | ref | function | return doctest.register_optionflag("ALLOW_UNICODE")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 698 | _get_allow_bytes_flag | def | function | def _get_allow_bytes_flag() -> int:
"""Register and return the ALLOW_BYTES flag."""
import doctest
return doctest.register_optionflag("ALLOW_BYTES")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 702 | register_optionflag | ref | function | return doctest.register_optionflag("ALLOW_BYTES")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 705 | _get_number_flag | def | function | def _get_number_flag() -> int:
"""Register and return the NUMBER flag."""
import doctest
return doctest.register_optionflag("NUMBER")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 709 | register_optionflag | ref | function | return doctest.register_optionflag("NUMBER")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 712 | _get_report_choice | def | function | def _get_report_choice(key: str) -> int:
"""Return the actual `doctest` module flag value.
We want to do it as late as possible to avoid importing `doctest` and all
its dependencies when parsing options, as it adds overhead and breaks tests.
"""
import doctest
return {
DOCTEST_REPORT_C... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 729 | fixture | ref | function | @pytest.fixture(scope="session")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/doctest.py | src/_pytest/doctest.py | 730 | doctest_namespace | def | function | def doctest_namespace() -> Dict[str, Any]:
"""Fixture that returns a :py:class:`dict` that will be injected into the
namespace of doctests."""
return dict()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 17 | pytest_addoption | def | function | def pytest_addoption(parser: Parser) -> None:
help = (
"Dump the traceback of all threads if a test takes "
"more than TIMEOUT seconds to finish."
)
parser.addini("faulthandler_timeout", help, default=0.0)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 22 | addini | ref | function | parser.addini("faulthandler_timeout", help, default=0.0)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 25 | pytest_configure | def | function | def pytest_configure(config: Config) -> None:
import faulthandler
stderr_fd_copy = os.dup(get_stderr_fileno())
config.stash[fault_handler_stderr_key] = open(stderr_fd_copy, "w")
config.stash[fault_handler_originally_enabled_key] = faulthandler.is_enabled()
faulthandler.enable(file=config.stash[faul... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 28 | get_stderr_fileno | ref | function | stderr_fd_copy = os.dup(get_stderr_fileno())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 30 | is_enabled | ref | function | config.stash[fault_handler_originally_enabled_key] = faulthandler.is_enabled()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 31 | enable | ref | function | faulthandler.enable(file=config.stash[fault_handler_stderr_key])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 34 | pytest_unconfigure | def | function | def pytest_unconfigure(config: Config) -> None:
import faulthandler
faulthandler.disable()
# Close the dup file installed during pytest_configure.
if fault_handler_stderr_key in config.stash:
config.stash[fault_handler_stderr_key].close()
del config.stash[fault_handler_stderr_key]
i... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 37 | disable | ref | function | faulthandler.disable()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 44 | enable | ref | function | faulthandler.enable(file=get_stderr_fileno())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 44 | get_stderr_fileno | ref | function | faulthandler.enable(file=get_stderr_fileno())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 47 | get_stderr_fileno | def | function | def get_stderr_fileno() -> int:
try:
fileno = sys.stderr.fileno()
# The Twisted Logger will return an invalid file descriptor since it is not backed
# by an FD. So, let's also forward this to the same code path as with pytest-xdist.
if fileno == -1:
raise AttributeError()... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 62 | get_timeout_config_value | def | function | def get_timeout_config_value(config: Config) -> float:
return float(config.getini("faulthandler_timeout") or 0.0)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 63 | getini | ref | function | return float(config.getini("faulthandler_timeout") or 0.0)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 66 | hookimpl | ref | function | @pytest.hookimpl(hookwrapper=True, trylast=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 67 | pytest_runtest_protocol | def | function | def pytest_runtest_protocol(item: Item) -> Generator[None, None, None]:
timeout = get_timeout_config_value(item.config)
stderr = item.config.stash[fault_handler_stderr_key]
if timeout > 0 and stderr is not None:
import faulthandler
faulthandler.dump_traceback_later(timeout, file=stderr)
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 68 | get_timeout_config_value | ref | function | timeout = get_timeout_config_value(item.config)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 73 | dump_traceback_later | ref | function | faulthandler.dump_traceback_later(timeout, file=stderr)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 77 | cancel_dump_traceback_later | ref | function | faulthandler.cancel_dump_traceback_later()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 82 | hookimpl | ref | function | @pytest.hookimpl(tryfirst=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 83 | pytest_enter_pdb | def | function | def pytest_enter_pdb() -> None:
"""Cancel any traceback dumping due to timeout before entering pdb."""
import faulthandler
faulthandler.cancel_dump_traceback_later()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 87 | cancel_dump_traceback_later | ref | function | faulthandler.cancel_dump_traceback_later()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 90 | hookimpl | ref | function | @pytest.hookimpl(tryfirst=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 91 | pytest_exception_interact | def | function | def pytest_exception_interact() -> None:
"""Cancel any traceback dumping due to an interactive exception being
raised."""
import faulthandler
faulthandler.cancel_dump_traceback_later()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/faulthandler.py | src/_pytest/faulthandler.py | 96 | cancel_dump_traceback_later | ref | function | faulthandler.cancel_dump_traceback_later()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 107 | PseudoFixtureDef | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 112 | pytest_sessionstart | def | function | def pytest_sessionstart(session: "Session") -> None:
session._fixturemanager = FixtureManager(session)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 113 | FixtureManager | ref | function | session._fixturemanager = FixtureManager(session)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 116 | get_scope_package | def | function | def get_scope_package(node, fixturedef: "FixtureDef[object]"):
import pytest
cls = pytest.Package
current = node
fixture_package_name = "{}/{}".format(fixturedef.baseid, "__init__.py")
while current and (
type(current) is not cls or fixture_package_name != current.nodeid
):
curr... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 131 | get_scope_node | def | function | def get_scope_node(
node: nodes.Node, scope: Scope
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 137 | getparent | ref | function | return node.getparent(nodes.Item)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 139 | getparent | ref | function | return node.getparent(_pytest.python.Class)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 141 | getparent | ref | function | return node.getparent(_pytest.python.Module)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 143 | getparent | ref | function | return node.getparent(_pytest.python.Package)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 145 | getparent | ref | function | return node.getparent(_pytest.main.Session)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 147 | assert_never | ref | function | assert_never(scope)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 154 | add_funcarg_pseudo_fixture_def | def | function | def add_funcarg_pseudo_fixture_def(
collector: nodes.Collector, metafunc: "Metafunc", fixturemanager: "FixtureManager"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 192 | get_scope_node | ref | function | node = get_scope_node(collector, scope)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 209 | FixtureDef | ref | function | fixturedef = FixtureDef(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 224 | getfixturemarker | def | function | def getfixturemarker(obj: object) -> Optional["FixtureFunctionMarker"]:
"""Return fixturemarker or None if it doesn't exist or raised
exceptions."""
try:
fixturemarker: Optional[FixtureFunctionMarker] = getattr(
obj, "_pytestfixturefunction", None
)
except TEST_OUTCOME:
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 242 | get_parametrized_fixture_keys | def | function | def get_parametrized_fixture_keys(item: nodes.Item, scope: Scope) -> Iterator[_Key]:
"""Return list of keys for all parametrized arguments which match
the specified scope."""
assert scope is not Scope.Function
try:
callspec = item.callspec # type: ignore[attr-defined]
except AttributeError:... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 268 | assert_never | ref | function | assert_never(scope)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 278 | reorder_items | def | function | def reorder_items(items: Sequence[nodes.Item]) -> List[nodes.Item]:
argkeys_cache: Dict[Scope, Dict[nodes.Item, Dict[_Key, None]]] = {}
items_by_argkey: Dict[Scope, Dict[_Key, Deque[nodes.Item]]] = {}
for scope in HIGH_SCOPES:
d: Dict[nodes.Item, Dict[_Key, None]] = {}
argkeys_cache[scope] =... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 287 | get_parametrized_fixture_keys | ref | function | keys = dict.fromkeys(get_parametrized_fixture_keys(item, scope), None)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 294 | reorder_items_atscope | ref | function | reorder_items_atscope(items_dict, argkeys_cache, items_by_argkey, Scope.Session)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 298 | fix_cache_order | def | function | def fix_cache_order(
item: nodes.Item,
argkeys_cache: Dict[Scope, Dict[nodes.Item, Dict[_Key, None]]],
items_by_argkey: Dict[Scope, Dict[_Key, "Deque[nodes.Item]"]],
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 308 | reorder_items_atscope | def | function | def reorder_items_atscope(
items: Dict[nodes.Item, None],
argkeys_cache: Dict[Scope, Dict[nodes.Item, Dict[_Key, None]]],
items_by_argkey: Dict[Scope, Dict[_Key, "Deque[nodes.Item]"]],
scope: Scope,
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 341 | fix_cache_order | ref | function | fix_cache_order(i, argkeys_cache, items_by_argkey)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 345 | reorder_items_atscope | ref | function | no_argkey_group = reorder_items_atscope(
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.