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/python.py
src/_pytest/python.py
964
normalize_mark_list
ref
function
marks=[*self.marks, *normalize_mark_list(marks)],
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
967
getparam
def
function
def getparam(self, name: str) -> object: try: return self.params[name] except KeyError as e: raise ValueError(name) from e @property def id(self) -> str: return "-".join(self._idlist)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
979
Metafunc
def
class
__init__ parametrize _resolve_arg_ids _validate_ids _resolve_arg_value_types _validate_if_using_arg_names
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
997
check_ispytest
ref
function
check_ispytest(_ispytest)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,022
parametrize
def
function
def parametrize( self, argnames: Union[str, List[str], Tuple[str, ...]], argvalues: Iterable[Union[ParameterSet, Sequence[object], object]], indirect: Union[bool, Sequence[str]] = _False, ids: Optional[ Union[ Iterable[Union[None, str, float, int, ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,098
_for_parametrize
ref
function
argnames, parameters = ParameterSet._for_parametrize(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,108
fail
ref
function
fail(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,114
from_user
ref
function
scope_ = Scope.from_user(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,118
_find_parametrized_scope
ref
function
scope_ = _find_parametrized_scope(argnames, self._arg2fixturedefs, indirect)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,120
_validate_if_using_arg_names
ref
function
self._validate_if_using_arg_names(argnames, indirect)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,122
_resolve_arg_value_types
ref
function
arg_values_types = self._resolve_arg_value_types(argnames, indirect)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,130
_resolve_arg_ids
ref
function
ids = self._resolve_arg_ids(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,142
CallSpec2
ref
function
for callspec in self._calls or [CallSpec2()]:
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,144
setmulti
ref
function
newcallspec = callspec.setmulti(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,156
_resolve_arg_ids
def
function
def _resolve_arg_ids( self, argnames: Sequence[str], ids: Optional[ Union[ Iterable[Union[None, str, float, int, bool]], Callable[[Any], Optional[object]], ] ], parameters: Sequence[ParameterSet], nodeid: str, ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,186
_validate_ids
ref
function
ids_ = self._validate_ids(ids, parameters, self.function.__name__)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,187
idmaker
ref
function
return idmaker(argnames, parameters, idfn, ids_, self.config, nodeid=nodeid)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,189
_validate_ids
def
function
def _validate_ids( self, ids: Iterable[Union[None, str, float, int, bool]], parameters: Sequence[ParameterSet], func_name: str, ) -> List[Union[None, str]]: try: num_ids = len(ids) # type: ignore[arg-type] except TypeError: try: ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,207
fail
ref
function
fail(msg.format(func_name, len(parameters), num_ids), pytrace=False)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,220
fail
ref
function
fail(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,221
saferepr
ref
function
msg.format(func_name, saferepr(id_value), type(id_value), idx),
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,226
_resolve_arg_value_types
def
function
def _resolve_arg_value_types( self, argnames: Sequence[str], indirect: Union[bool, Sequence[str]], ) -> Dict[str, "Literal['params', 'funcargs']"]: """Resolve if each parametrized argument must be considered a parameter to a fixture or a "funcarg" to the function, based o...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,250
fail
ref
function
fail(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,258
fail
ref
function
fail(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,266
_validate_if_using_arg_names
def
function
def _validate_if_using_arg_names( self, argnames: Sequence[str], indirect: Union[bool, Sequence[str]], ) -> None: """Check if all argnames are being used, by default values, or directly/indirectly. :param List[str] argnames: List of argument names passed to ``parametrize...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,277
get_default_arg_names
ref
function
default_arg_names = set(get_default_arg_names(self.function))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,282
fail
ref
function
fail(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,293
fail
ref
function
fail(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,299
_find_parametrized_scope
def
function
def _find_parametrized_scope( argnames: Sequence[str], arg2fixturedefs: Mapping[str, Sequence[fixtures.FixtureDef[object]]], indirect: Union[bool, Sequence[str]],
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,331
_ascii_escaped_by_config
def
function
def _ascii_escaped_by_config(val: Union[str, bytes], config: Optional[Config]) -> str: if config is None: escape_option = _False else: escape_option = config.getini( "disable_test_id_escaping_and_forfeit_all_rights_to_community_support" ) # TODO: If escaping is turned off...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,335
getini
ref
function
escape_option = config.getini(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,341
ascii_escaped
ref
function
return val if escape_option else ascii_escaped(val) # type: ignore
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,344
_idval
def
function
def _idval( val: object, argname: str, idx: int, idfn: Optional[Callable[[Any], Optional[object]]], nodeid: Optional[str], config: Optional[Config],
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,354
idfn
ref
function
generated_id = idfn(val)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,363
pytest_make_parametrize_id
ref
function
hook_id: Optional[str] = config.hook.pytest_make_parametrize_id(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,370
_ascii_escaped_by_config
ref
function
return _ascii_escaped_by_config(val, config)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,374
ascii_escaped
ref
function
return ascii_escaped(val.pattern)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,387
_idvalset
def
function
def _idvalset( idx: int, parameterset: ParameterSet, argnames: Iterable[str], idfn: Optional[Callable[[Any], Optional[object]]], ids: Optional[List[Union[None, str]]], nodeid: Optional[str], config: Optional[Config],
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,401
_idval
ref
function
_idval(val, argname, idx, idfn, nodeid=nodeid, config=config)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,406
_ascii_escaped_by_config
ref
function
return _ascii_escaped_by_config(id, config)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,409
idmaker
def
function
def idmaker( argnames: Iterable[str], parametersets: Iterable[ParameterSet], idfn: Optional[Callable[[Any], Optional[object]]] = None, ids: Optional[List[Union[None, str]]] = None, config: Optional[Config] = None, nodeid: Optional[str] = None,
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,418
_idvalset
ref
function
_idvalset(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,443
_pretty_fixture_path
def
function
def _pretty_fixture_path(func) -> str: cwd = Path.cwd() loc = Path(getlocation(func, str(cwd))) prefix = Path("...", "_pytest") try: return str(prefix / loc.relative_to(_PYTEST_DIR)) except ValueError: return bestrelpath(cwd, loc)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,445
getlocation
ref
function
loc = Path(getlocation(func, str(cwd)))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,450
bestrelpath
ref
function
return bestrelpath(cwd, loc)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,453
show_fixtures_per_test
def
function
def show_fixtures_per_test(config): from _pytest.main import wrap_session return wrap_session(config, _show_fixtures_per_test)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,456
wrap_session
ref
function
return wrap_session(config, _show_fixtures_per_test)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,459
_show_fixtures_per_test
def
function
def _show_fixtures_per_test(config: Config, session: Session) -> None: import _pytest.config session.perform_collect() curdir = Path.cwd() tw = _pytest.config.create_terminal_writer(config) verbose = config.getvalue("verbose") def get_best_relpath(func) -> str: loc = getlocation(func, ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,462
perform_collect
ref
function
session.perform_collect()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,464
create_terminal_writer
ref
function
tw = _pytest.config.create_terminal_writer(config)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,465
getvalue
ref
function
verbose = config.getvalue("verbose")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,467
get_best_relpath
def
function
def get_best_relpath(func) -> str: loc = getlocation(func, str(curdir)) return bestrelpath(curdir, Path(loc)) def write_fixture(fixture_def: fixtures.FixtureDef[object]) -> None: argname = fixture_def.argname if verbose <= 0 and argname.startswith("_"): return ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,468
getlocation
ref
function
loc = getlocation(func, str(curdir))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,469
bestrelpath
ref
function
return bestrelpath(curdir, Path(loc))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,471
write_fixture
def
function
def write_fixture(fixture_def: fixtures.FixtureDef[object]) -> None: argname = fixture_def.argname if verbose <= 0 and argname.startswith("_"): return prettypath = _pretty_fixture_path(fixture_def.func) tw.write(f"{argname}", green=_True) tw.write(f" -- {prettypat...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,475
_pretty_fixture_path
ref
function
prettypath = _pretty_fixture_path(fixture_def.func)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,481
write_docstring
ref
function
write_docstring(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,485
line
ref
function
tw.line(" no docstring available", red=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,487
write_item
def
function
def write_item(item: nodes.Item) -> None: # Not all items have _fixtureinfo attribute. info: Optional[FuncFixtureInfo] = getattr(item, "_fixtureinfo", None) if info is None or not info.name2fixturedefs: # This test item does not use any fixtures. return tw.lin...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,493
line
ref
function
tw.line()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,494
sep
ref
function
tw.sep("-", f"fixtures used by {item.name}")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,496
sep
ref
function
tw.sep("-", f"({get_best_relpath(item.function)})") # type: ignore[attr-defined]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,496
get_best_relpath
ref
function
tw.sep("-", f"({get_best_relpath(item.function)})") # type: ignore[attr-defined]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,503
write_fixture
ref
function
write_fixture(fixturedefs[-1])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,506
write_item
ref
function
write_item(session_item)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,509
showfixtures
def
function
def showfixtures(config: Config) -> Union[int, ExitCode]: from _pytest.main import wrap_session return wrap_session(config, _showfixtures_main)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,512
wrap_session
ref
function
return wrap_session(config, _showfixtures_main)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,515
_showfixtures_main
def
function
def _showfixtures_main(config: Config, session: Session) -> None: import _pytest.config session.perform_collect() curdir = Path.cwd() tw = _pytest.config.create_terminal_writer(config) verbose = config.getvalue("verbose") fm = session._fixturemanager available = [] seen: Set[Tuple[str...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,518
perform_collect
ref
function
session.perform_collect()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,520
create_terminal_writer
ref
function
tw = _pytest.config.create_terminal_writer(config)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,521
getvalue
ref
function
verbose = config.getvalue("verbose")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,533
getlocation
ref
function
loc = getlocation(fixturedef.func, str(curdir))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,541
_pretty_fixture_path
ref
function
_pretty_fixture_path(fixturedef.func),
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,552
line
ref
function
tw.line()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,553
sep
ref
function
tw.sep("-", f"fixtures defined from {module}")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,564
write_docstring
ref
function
write_docstring(tw, doc.split("\n\n")[0] if verbose <= 0 else doc)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,566
line
ref
function
tw.line(" no docstring available", red=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,567
line
ref
function
tw.line()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,570
write_docstring
def
function
def write_docstring(tw: TerminalWriter, doc: str, indent: str = " ") -> None: for line in doc.split("\n"): tw.line(indent + line)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,572
line
ref
function
tw.line(indent + line)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,575
Function
def
class
__init__ from_parent _initrequest function instance _getobj _pyfuncitem runtest setup _prunetraceback repr_failure
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,636
get_unpacked_marks
ref
function
self.own_markers.extend(get_unpacked_marks(self.obj))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,646
normalize_mark_list
ref
function
self.own_markers.extend(normalize_mark_list(callspec.marks))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,656
iter_markers
ref
function
for mark in self.iter_markers()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,662
getfixtureinfo
ref
function
fixtureinfo = self.session._fixturemanager.getfixtureinfo(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,667
_initrequest
ref
function
self._initrequest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,670
from_parent
def
function
def from_parent(cls, parent, **kw): # todo: determine sound type limitations """The public constructor.""" return super().from_parent(parent=parent, **kw) def _initrequest(self) -> None: self.funcargs: Dict[str, object] = {} self._request = fixtures.FixtureRequest(self, _ispyte...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,672
from_parent
ref
function
return super().from_parent(parent=parent, **kw)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,674
_initrequest
def
function
def _initrequest(self) -> None: self.funcargs: Dict[str, object] = {} self._request = fixtures.FixtureRequest(self, _ispytest=_True) @property def function(self): """Underlying python 'function' object.""" return getimfunc(self.obj) @property def instance(self): ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,676
FixtureRequest
ref
function
self._request = fixtures.FixtureRequest(self, _ispytest=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,679
function
def
function
def function(self): """Underlying python 'function' object.""" return getimfunc(self.obj) @property def instance(self): """Python instance object the function is bound to. Returns None if not a test method, e.g. for a standalone test function or a staticmethod. ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,681
getimfunc
ref
function
return getimfunc(self.obj)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,684
instance
def
function
def instance(self): """Python instance object the function is bound to. Returns None if not a test method, e.g. for a standalone test function or a staticmethod. """ return getattr(self.obj, "__self__", None) def _getobj(self): assert self.parent is not None ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,692
_getobj
def
function
def _getobj(self): """Get the underlying Python object. May be overwritten by subclasses.""" # TODO: Improve the type of `parent` such that assert/ignore aren't needed. assert self.parent is not None obj = self.parent.obj # type: ignore[attr-defined] return getattr(obj, self...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,696
newinstance
ref
function
parent_obj = self.parent.newinstance()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,702
_pyfuncitem
def
function
def _pyfuncitem(self): """(compatonly) for code expecting pytest-2.2 style request objects.""" return self def runtest(self) -> None: """Execute the underlying test function.""" self.ihook.pytest_pyfunc_call(pyfuncitem=self) def setup(self) -> None: self._request._f...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,706
runtest
def
function
def runtest(self) -> None: """Execute the underlying test function.""" self.ihook.pytest_pyfunc_call(pyfuncitem=self) def setup(self) -> None: self._request._fillfixtures() def _prunetraceback(self, excinfo: ExceptionInfo[BaseException]) -> None: if hasattr(self, "_obj") an...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,708
pytest_pyfunc_call
ref
function
self.ihook.pytest_pyfunc_call(pyfuncitem=self)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,710
setup
def
function
def setup(self) -> None: # Not using fixtures to call setup_module here because autouse fixtures # from packages are not called automatically (#4085). setup_module = _get_first_non_fixture_func( self.obj, ("setUpModule", "setup_module") ) if setup_module is not No...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
1,711
_fillfixtures
ref
function
self._request._fillfixtures()