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/fixtures.py | src/_pytest/fixtures.py | 900 | fail_fixturefunc | def | function | def fail_fixturefunc(fixturefunc, msg: str) -> "NoReturn":
fs, lineno = getfslineno(fixturefunc)
location = f"{fs}:{lineno + 1}"
source = _pytest._code.Source(fixturefunc)
fail(msg + ":\n\n" + str(source.indent()) + "\n" + location, pytrace=_False)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 901 | getfslineno | ref | function | fs, lineno = getfslineno(fixturefunc)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 903 | Source | ref | function | source = _pytest._code.Source(fixturefunc)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 904 | fail | ref | function | fail(msg + ":\n\n" + str(source.indent()) + "\n" + location, pytrace=False)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 904 | indent | ref | function | fail(msg + ":\n\n" + str(source.indent()) + "\n" + location, pytrace=False)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 907 | call_fixture_func | def | function | def call_fixture_func(
fixturefunc: "_FixtureFunc[FixtureValue]", request: FixtureRequest, kwargs
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 910 | is_generator | ref | function | if is_generator(fixturefunc):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 914 | fixturefunc | ref | function | generator = fixturefunc(**kwargs)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 920 | addfinalizer | ref | function | request.addfinalizer(finalizer)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 923 | fixturefunc | ref | function | fixture_result = fixturefunc(**kwargs)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 927 | _teardown_yield_fixture | def | function | def _teardown_yield_fixture(fixturefunc, it) -> None:
"""Execute the teardown of a fixture function by advancing the iterator
after the yield and ensure the iteration ends (if not it means there is
more than one yield in the function)."""
try:
next(it)
except StopIteration:
pass
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 936 | fail_fixturefunc | ref | function | fail_fixturefunc(fixturefunc, "fixture function has more than one 'yield'")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 939 | _eval_scope_callable | def | function | def _eval_scope_callable(
scope_callable: "Callable[[str, Config], _ScopeName]",
fixture_name: str,
config: Config,
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 947 | scope_callable | ref | function | result = scope_callable(fixture_name=fixture_name, config=config) # type: ignore[call-arg]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 956 | fail | ref | function | fail(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 965 | FixtureDef | def | class | __init__ scope addfinalizer finish execute cache_key __repr__ |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 992 | _eval_scope_callable | ref | function | scope = _eval_scope_callable(scope, argname, fixturemanager.config)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 995 | from_user | ref | function | scope = Scope.from_user(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,000 | getfuncargnames | ref | function | self.argnames: Tuple[str, ...] = getfuncargnames(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,009 | scope | def | function | def scope(self) -> "_ScopeName":
"""Scope string, one of "function", "class", "module", "package", "session"."""
return self._scope.value
@property
def fixturenames(self) -> List[str]:
"""Names of all active fixtures in this request."""
result = list(self._pyfuncitem._fixtur... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,013 | addfinalizer | def | function | def addfinalizer(self, finalizer: Callable[[], object]) -> None:
"""Add finalizer/teardown function to be called after the last test
within the requesting test context finished execution."""
# XXX usually this method is shadowed by fixturedef specific ones.
self._addfinalizer(finaliz... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,016 | finish | def | function | def finish(self, request: SubRequest) -> None:
exc = None
try:
while self._finalizers:
try:
func = self._finalizers.pop()
func()
except BaseException as e:
# XXX Only first exception will be seen ... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,022 | func | ref | function | func()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,031 | gethookproxy | ref | function | hook = self._fixturemanager.session.gethookproxy(request.node.path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,032 | pytest_fixture_post_finalizer | ref | function | hook.pytest_fixture_post_finalizer(fixturedef=self, request=request)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,039 | execute | def | function | def execute(self, request: SubRequest) -> FixtureValue:
# Get required arguments and register our own finish()
# with their finalization.
for argname in self.argnames:
fixturedef = request._get_active_fixturedef(argname)
if argname != "request":
# Pseu... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,043 | _get_active_fixturedef | ref | function | fixturedef = request._get_active_fixturedef(argname)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,047 | addfinalizer | ref | function | fixturedef.addfinalizer(functools.partial(self.finish, request=request))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,049 | cache_key | ref | function | my_cache_key = self.cache_key(request)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,057 | with_traceback | ref | function | raise val.with_traceback(tb)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,063 | finish | ref | function | self.finish(request)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,066 | gethookproxy | ref | function | hook = self._fixturemanager.session.gethookproxy(request.node.path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,067 | pytest_fixture_setup | ref | function | result = hook.pytest_fixture_setup(fixturedef=self, request=request)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,070 | cache_key | def | function | def cache_key(self, request: SubRequest) -> object:
return request.param_index if not hasattr(request, "param") else request.param
def __repr__(self) -> str:
return "<FixtureDef argname={!r} scope={!r} baseid={!r}>".format(
self.argname, self.scope, self.baseid
)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,079 | resolve_fixture_function | def | function | def resolve_fixture_function(
fixturedef: FixtureDef[FixtureValue], request: FixtureRequest
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,100 | getimfunc | ref | function | fixturefunc = getimfunc(fixturedef.func)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,106 | pytest_fixture_setup | def | function | def pytest_fixture_setup(
fixturedef: FixtureDef[FixtureValue], request: SubRequest
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,112 | _get_active_fixturedef | ref | function | fixdef = request._get_active_fixturedef(argname)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,115 | _check_scope | ref | function | request._check_scope(argname, request._scope, fixdef._scope)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,118 | resolve_fixture_function | ref | function | fixturefunc = resolve_fixture_function(fixturedef, request)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,119 | cache_key | ref | function | my_cache_key = fixturedef.cache_key(request)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,121 | call_fixture_func | ref | function | result = call_fixture_func(fixturefunc, request, kwargs)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,131 | _ensure_immutable_ids | def | function | def _ensure_immutable_ids(
ids: Optional[
Union[
Iterable[Union[None, str, float, int, bool]],
Callable[[Any], Optional[object]],
]
],
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,151 | _params_converter | def | function | def _params_converter(
params: Optional[Iterable[object]],
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,157 | wrap_function_to_error_out_if_called_directly | def | function | def wrap_function_to_error_out_if_called_directly(
function: FixtureFunction,
fixture_marker: "FixtureFunctionMarker",
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,171 | result | def | function | def result(*args, **kwargs):
fail(message, pytrace=_False)
# Keep reference to the original function in our own custom attribute so we don't unwrap
# further than this point and lose useful wrappings like @mock.patch (#3774).
result.__pytest_wrapped__ = _PytestWrapper(function) # type: ignore[... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,172 | fail | ref | function | fail(message, pytrace=False)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,176 | _PytestWrapper | ref | function | result.__pytest_wrapped__ = _PytestWrapper(function) # type: ignore[attr-defined]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,183 | FixtureFunctionMarker | def | class | __call__ |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,205 | wrap_function_to_error_out_if_called_directly | ref | function | function = wrap_function_to_error_out_if_called_directly(function, self)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,209 | getlocation | ref | function | location = getlocation(function)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,210 | fail | ref | function | fail(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,223 | fixture | def | function | def fixture(
fixture_function: FixtureFunction,
*,
scope: "Union[_ScopeName, Callable[[str, Config], _ScopeName]]" = ...,
params: Optional[Iterable[object]] = ...,
autouse: bool = ...,
ids: Optional[
Union[
Iterable[Union[None, str, float, int, bool]],
Callable[[A... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,241 | fixture | def | function | def fixture(
fixture_function: FixtureFunction,
*,
scope: "Union[_ScopeName, Callable[[str, Config], _ScopeName]]" = ...,
params: Optional[Iterable[object]] = ...,
autouse: bool = ...,
ids: Optional[
Union[
Iterable[Union[None, str, float, int, bool]],
Callable[[A... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,258 | fixture | def | function | def fixture(
fixture_function: FixtureFunction,
*,
scope: "Union[_ScopeName, Callable[[str, Config], _ScopeName]]" = ...,
params: Optional[Iterable[object]] = ...,
autouse: bool = ...,
ids: Optional[
Union[
Iterable[Union[None, str, float, int, bool]],
Callable[[A... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,322 | FixtureFunctionMarker | ref | function | fixture_marker = FixtureFunctionMarker(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,332 | fixture_marker | ref | function | return fixture_marker(fixture_function)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,337 | yield_fixture | def | function | def yield_fixture(
fixture_function=None,
*args,
scope="function",
params=None,
autouse=_False,
ids=None,
name=None,
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,352 | fixture | ref | function | return fixture(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,363 | fixture | ref | function | @fixture(scope="session")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,364 | pytestconfig | def | function | def pytestconfig(request: FixtureRequest) -> Config:
"""Session-scoped fixture that returns the session's :class:`pytest.Config`
object.
Example::
def test_foo(pytestconfig):
if pytestconfig.getoption("verbose") > 0:
...
"""
return request.config
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,378 | pytest_addoption | def | function | def pytest_addoption(parser: Parser) -> None:
parser.addini(
"usefixtures",
type="args",
default=[],
help="list of default fixtures to be used with this project",
)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,379 | addini | ref | function | parser.addini(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,387 | FixtureManager | def | class | __init__ _get_direct_parametrize_args getfixtureinfo pytest_plugin_registered _getautousenames getfixtureclosure pytest_generate_tests pytest_collection_modifyitems parsefactories getfixturedefs _matchfactories |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,428 | getini | ref | function | "": self.config.getini("usefixtures"),
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,430 | register | ref | function | session.config.pluginmanager.register(self, "funcmanage")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,432 | _get_direct_parametrize_args | def | function | def _get_direct_parametrize_args(self, node: nodes.Node) -> List[str]:
"""Return all direct parametrization arguments of a node, so we don't
mistake them for fixtures.
Check https://github.com/pytest-dev/pytest/issues/5036.
These things are done later as well when dealing with para... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,442 | iter_markers | ref | function | for marker in node.iter_markers(name="parametrize"):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,444 | _parse_parametrize_args | ref | function | p_argnames, _ = ParameterSet._parse_parametrize_args(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,451 | getfixtureinfo | def | function | def getfixtureinfo(
self, node: nodes.Node, func, cls, funcargs: bool = _True
) -> FuncFixtureInfo:
if funcargs and not getattr(node, "nofuncargs", _False):
argnames = getfuncargnames(func, name=node.name, cls=cls)
else:
argnames = ()
usefixtures = tuple(... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,455 | getfuncargnames | ref | function | argnames = getfuncargnames(func, name=node.name, cls=cls)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,460 | iter_markers | ref | function | arg for mark in node.iter_markers(name="usefixtures") for arg in mark.args
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,464 | getfixtureclosure | ref | function | initialnames, names_closure, arg2fixturedefs = fm.getfixtureclosure(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,465 | _get_direct_parametrize_args | ref | function | initialnames, node, ignore_args=self._get_direct_parametrize_args(node)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,467 | FuncFixtureInfo | ref | function | return FuncFixtureInfo(argnames, initialnames, names_closure, arg2fixturedefs)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,469 | pytest_plugin_registered | def | function | def pytest_plugin_registered(self, plugin: _PluggyPlugin) -> None:
nodeid = None
try:
p = absolutepath(plugin.__file__) # type: ignore[attr-defined]
except AttributeError:
pass
else:
# Construct the base nodeid which is later used to check
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,472 | absolutepath | ref | function | p = absolutepath(plugin.__file__) # type: ignore[attr-defined]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,489 | parsefactories | ref | function | self.parsefactories(plugin, nodeid)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,491 | _getautousenames | def | function | def _getautousenames(self, nodeid: str) -> Iterator[str]:
"""Return the names of autouse fixtures applicable to nodeid."""
for parentnodeid in nodes.iterparentnodeids(nodeid):
basenames = self._nodeid_autousenames.get(parentnodeid)
if basenames:
yield from bas... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,493 | iterparentnodeids | ref | function | for parentnodeid in nodes.iterparentnodeids(nodeid):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,498 | getfixtureclosure | def | function | def getfixtureclosure(
self,
fixturenames: Tuple[str, ...],
parentnode: nodes.Node,
ignore_args: Sequence[str] = (),
) -> Tuple[Tuple[str, ...], List[str], Dict[str, Sequence[FixtureDef[Any]]]]:
# Collect the closure of all fixtures, starting with the given
# fixt... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,512 | _getautousenames | ref | function | fixturenames_closure = list(self._getautousenames(parentid))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,514 | merge | def | function | def merge(otherlist: Iterable[str]) -> None:
for arg in otherlist:
if arg not in fixturenames_closure:
fixturenames_closure.append(arg)
merge(fixturenames)
# At this point, fixturenames_closure contains what we call "initialnames",
# whic... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,519 | merge | ref | function | merge(fixturenames)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,535 | getfixturedefs | ref | function | fixturedefs = self.getfixturedefs(argname, parentid)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,538 | merge | ref | function | merge(fixturedefs[-1].argnames)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,540 | sort_by_scope | def | function | def sort_by_scope(arg_name: str) -> Scope:
try:
fixturedefs = arg2fixturedefs[arg_name]
except KeyError:
return Scope.Function
else:
return fixturedefs[-1]._scope
fixturenames_closure.sort(key=sort_by_scope, reverse=_Tr... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,551 | pytest_generate_tests | def | function | def pytest_generate_tests(self, metafunc: "Metafunc") -> None:
"""Generate new tests based on parametrized fixtures used by the given metafunc"""
def get_parametrize_mark_argnames(mark: Mark) -> Sequence[str]:
args, _ = ParameterSet._parse_parametrize_args(*mark.args, **mark.kwargs)
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,554 | get_parametrize_mark_argnames | def | function | def get_parametrize_mark_argnames(mark: Mark) -> Sequence[str]:
args, _ = ParameterSet._parse_parametrize_args(*mark.args, **mark.kwargs)
return args
for argname in metafunc.fixturenames:
# Get the FixtureDefs for the argname.
fixture_defs = metafunc._arg... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,555 | _parse_parametrize_args | ref | function | args, _ = ParameterSet._parse_parametrize_args(*mark.args, **mark.kwargs)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,569 | get_parametrize_mark_argnames | ref | function | argname in get_parametrize_mark_argnames(mark)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,570 | iter_markers | ref | function | for mark in metafunc.definition.iter_markers("parametrize")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,581 | parametrize | ref | function | metafunc.parametrize(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,596 | pytest_collection_modifyitems | def | function | def pytest_collection_modifyitems(self, items: List[nodes.Item]) -> None:
# Separate parametrized setups.
items[:] = reorder_items(items)
def parsefactories(
self, node_or_obj, nodeid=NOTSET, unittest: bool = _False
) -> None:
if nodeid is not NOTSET:
holderobj =... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,598 | reorder_items | ref | function | items[:] = reorder_items(items)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,600 | parsefactories | def | function | def parsefactories(
self, node_or_obj, nodeid=NOTSET, unittest: bool = _False
) -> None:
if nodeid is not NOTSET:
holderobj = node_or_obj
else:
holderobj = node_or_obj.obj
nodeid = node_or_obj.nodeid
if holderobj in self._holderobjseen:
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,621 | safe_getattr | ref | function | obj = safe_getattr(holderobj, name, None)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,622 | getfixturemarker | ref | function | marker = getfixturemarker(obj)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,635 | get_real_method | ref | function | obj = get_real_method(obj, holderobj)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py | src/_pytest/fixtures.py | 1,637 | FixtureDef | ref | function | fixture_def = FixtureDef(
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.