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
145
pytest_generate_tests
def
function
def pytest_generate_tests(metafunc: "Metafunc") -> None: for marker in metafunc.definition.iter_markers(name="parametrize"): metafunc.parametrize(*marker.args, **marker.kwargs, _param_mark=marker)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
146
iter_markers
ref
function
for marker in metafunc.definition.iter_markers(name="parametrize"):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
147
parametrize
ref
function
metafunc.parametrize(*marker.args, **marker.kwargs, _param_mark=marker)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
150
pytest_configure
def
function
def pytest_configure(config: Config) -> None: config.addinivalue_line( "markers", "parametrize(argnames, argvalues): call a test function multiple " "times passing in different arguments in turn. argvalues generally " "needs to be a list of values if argnames specifies only one name ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
151
addinivalue_line
ref
function
config.addinivalue_line(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
162
addinivalue_line
ref
function
config.addinivalue_line(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
170
async_warn_and_skip
def
function
def async_warn_and_skip(nodeid: str) -> None: msg = "async def functions are not natively supported and have been skipped.\n" msg += ( "You need to install a suitable plugin for your async framework, for example:\n" ) msg += " - anyio\n" msg += " - pytest-asyncio\n" msg += " - pytest-...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
180
PytestUnhandledCoroutineWarning
ref
function
warnings.warn(PytestUnhandledCoroutineWarning(msg.format(nodeid)))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
181
skip
ref
function
skip(reason="async def function and no async plugin installed (see warnings)")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
184
hookimpl
ref
function
@hookimpl(trylast=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
185
pytest_pyfunc_call
def
function
def pytest_pyfunc_call(pyfuncitem: "Function") -> Optional[object]: testfunction = pyfuncitem.obj if is_async_function(testfunction): async_warn_and_skip(pyfuncitem.nodeid) funcargs = pyfuncitem.funcargs testargs = {arg: funcargs[arg] for arg in pyfuncitem._fixtureinfo.argnames} result = tes...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
187
is_async_function
ref
function
if is_async_function(testfunction):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
188
async_warn_and_skip
ref
function
async_warn_and_skip(pyfuncitem.nodeid)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
191
testfunction
ref
function
result = testfunction(**testargs)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
193
async_warn_and_skip
ref
function
async_warn_and_skip(pyfuncitem.nodeid)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
197
pytest_collect_file
def
function
def pytest_collect_file(fspath: Path, parent: nodes.Collector) -> Optional["Module"]: if fspath.suffix == ".py": if not parent.session.isinitpath(fspath): if not path_matches_patterns( fspath, parent.config.getini("python_files") + ["__init__.py"] ): r...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
199
isinitpath
ref
function
if not parent.session.isinitpath(fspath):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
200
path_matches_patterns
ref
function
if not path_matches_patterns(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
201
getini
ref
function
fspath, parent.config.getini("python_files") + ["__init__.py"]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
204
gethookproxy
ref
function
ihook = parent.session.gethookproxy(fspath)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
205
pytest_pycollect_makemodule
ref
function
module: Module = ihook.pytest_pycollect_makemodule(fspath=fspath, parent=parent)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
210
path_matches_patterns
def
function
def path_matches_patterns(path: Path, patterns: Iterable[str]) -> bool: """Return whether path matches any of the patterns in the list of globs given.""" return any(fnmatch_ex(pattern, path) for pattern in patterns)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
212
fnmatch_ex
ref
function
return any(fnmatch_ex(pattern, path) for pattern in patterns)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
215
pytest_pycollect_makemodule
def
function
def pytest_pycollect_makemodule(fspath: Path, parent) -> "Module": if fspath.name == "__init__.py": pkg: Package = Package.from_parent(parent, path=fspath) return pkg mod: Module = Module.from_parent(parent, path=fspath) return mod
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
217
from_parent
ref
function
pkg: Package = Package.from_parent(parent, path=fspath)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
219
from_parent
ref
function
mod: Module = Module.from_parent(parent, path=fspath)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
223
hookimpl
ref
function
@hookimpl(trylast=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
224
pytest_pycollect_makeitem
def
function
def pytest_pycollect_makeitem(collector: "PyCollector", name: str, obj: object): # Nothing was collected elsewhere, let's do it here. if safe_isclass(obj): if collector.istestclass(obj, name): return Class.from_parent(collector, name=name, obj=obj) elif collector.istestfunction(obj, name...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
226
safe_isclass
ref
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
227
istestclass
ref
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
228
from_parent
ref
function
return Class.from_parent(collector, name=name, obj=obj)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
229
istestfunction
ref
function
elif collector.istestfunction(obj, name):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
235
get_real_func
ref
function
if not (inspect.isfunction(obj) or inspect.isfunction(get_real_func(obj))):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
236
getfslineno
ref
function
filename, lineno = getfslineno(obj)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
238
PytestCollectionWarning
ref
function
message=PytestCollectionWarning(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
246
is_generator
ref
function
if is_generator(obj):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
247
from_parent
ref
function
res = Function.from_parent(collector, name=name)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
251
add_marker
ref
function
res.add_marker(MARK_GEN.xfail(run=False, reason=reason))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
251
xfail
ref
function
res.add_marker(MARK_GEN.xfail(run=False, reason=reason))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
252
PytestCollectionWarning
ref
function
res.warn(PytestCollectionWarning(reason))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
254
_genfunctions
ref
function
res = list(collector._genfunctions(name, obj))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
258
PyobjMixin
def
class
module cls obj obj _getobj getmodpath reportinfo
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
267
module
def
function
def module(self): """Python module object this node was collected from (can be None).""" node = self.getparent(Module) return node.obj if node is not None else None @property def cls(self): """Python class object this node was collected from (can be None).""" node = ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
269
getparent
ref
function
node = self.getparent(Module)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
273
cls
def
function
def cls(self): """Python class object this node was collected from (can be None).""" node = self.getparent(Class) return node.obj if node is not None else None @property def obj(self): """Underlying Python object.""" obj = getattr(self, "_obj", None) if obj i...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
275
getparent
ref
function
node = self.getparent(Class)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
279
obj
def
function
def obj(self): """Underlying Python object.""" obj = getattr(self, "_obj", None) if obj is None: self._obj = obj = self._getobj() # XXX evil hack # used to avoid Function marker duplication if self._ALLOW_MARKERS: self.own_marke...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
283
_getobj
ref
function
self._obj = obj = self._getobj()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
287
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
291
obj
def
function
def obj(self, value): self._obj = value 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: ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
294
_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
301
getmodpath
def
function
null
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
303
listchain
ref
function
chain = self.listchain()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
309
splitext
ref
function
name = os.path.splitext(name)[0]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
318
reportinfo
def
function
def reportinfo(self) -> Tuple[Union["os.PathLike[str]", str], Optional[int], str]: # XXX caching? obj = self.obj compat_co_firstlineno = getattr(obj, "compat_co_firstlineno", None) if isinstance(compat_co_firstlineno, int): # nose compatibility file_path = sys...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
330
getfslineno
ref
function
path, lineno = getfslineno(obj)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
331
getmodpath
ref
function
modpath = self.getmodpath()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
340
_EmptyClass
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
350
_EmptyClass
ref
function
dir(_EmptyClass()),
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
356
PyCollector
def
class
funcnamefilter isnosetest classnamefilter istestfunction istestclass _matches_prefix_or_glob_option collect _genfunctions
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
357
funcnamefilter
def
function
def funcnamefilter(self, name: str) -> bool: return self._matches_prefix_or_glob_option("python_functions", name) def isnosetest(self, obj: object) -> bool: """Look for the __test__ attribute, which is applied by the @nose.tools.istest decorator. """ # We explicitly chec...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
358
_matches_prefix_or_glob_option
ref
function
return self._matches_prefix_or_glob_option("python_functions", name)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
360
isnosetest
def
function
def isnosetest(self, obj: object) -> bool: """Look for the __test__ attribute, which is applied by the @nose.tools.istest decorator. """ # We explicitly check for "is _True" here to not mistakenly treat # classes with a custom __getattr__ returning something truthy (like a ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
367
safe_getattr
ref
function
return safe_getattr(obj, "__test__", False) is True
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
369
classnamefilter
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
370
_matches_prefix_or_glob_option
ref
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
372
istestfunction
def
function
def istestfunction(self, obj: object, name: str) -> bool: if self.funcnamefilter(name) or self.isnosetest(obj): if isinstance(obj, staticmethod): # staticmethods need to be unwrapped. obj = safe_getattr(obj, "__func__", _False) return callable(obj) and...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
373
funcnamefilter
ref
function
if self.funcnamefilter(name) or self.isnosetest(obj):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
373
isnosetest
ref
function
if self.funcnamefilter(name) or self.isnosetest(obj):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
376
safe_getattr
ref
function
obj = safe_getattr(obj, "__func__", False)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
377
getfixturemarker
ref
function
return callable(obj) and fixtures.getfixturemarker(obj) is None
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
381
istestclass
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
382
classnamefilter
ref
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
382
isnosetest
ref
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
384
_matches_prefix_or_glob_option
def
function
def _matches_prefix_or_glob_option(self, option_name: str, name: str) -> bool: """Check if the given name matches the prefix or glob-pattern defined in ini configuration.""" for option in self.config.getini(option_name): if name.startswith(option): return _True ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
387
getini
ref
function
for option in self.config.getini(option_name):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
399
collect
def
function
def collect(self) -> Iterable[Union[nodes.Item, nodes.Collector]]: if not getattr(self.obj, "__test__", _True): return [] # Avoid random getattrs and peek in the __dict__ instead. dicts = [getattr(self.obj, "__dict__", {})] if isinstance(self.obj, type): for ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
424
pytest_pycollect_makeitem
ref
function
res = ihook.pytest_pycollect_makeitem(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
442
_genfunctions
def
function
def _genfunctions(self, name: str, funcobj) -> Iterator["Function"]: modulecol = self.getparent(Module) assert modulecol is not None module = modulecol.obj clscol = self.getparent(Class) cls = clscol and clscol.obj or None definition = FunctionDefinition.from_parent(...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
443
getparent
ref
function
modulecol = self.getparent(Module)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
446
getparent
ref
function
clscol = self.getparent(Class)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
449
from_parent
ref
function
definition = FunctionDefinition.from_parent(self, name=name, callobj=funcobj)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
454
Metafunc
ref
function
metafunc = Metafunc(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
466
cls
ref
function
methods.append(cls().pytest_generate_tests)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
467
call_extra
ref
function
self.ihook.pytest_generate_tests.call_extra(methods, dict(metafunc=metafunc))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
470
from_parent
ref
function
yield Function.from_parent(self, name=name, fixtureinfo=fixtureinfo)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
474
add_funcarg_pseudo_fixture_def
ref
function
fixtures.add_funcarg_pseudo_fixture_def(self, metafunc, fm)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
479
prune_dependency_tree
ref
function
fixtureinfo.prune_dependency_tree()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
483
from_parent
ref
function
yield Function.from_parent(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
493
Module
def
class
_getobj collect _inject_setup_module_fixture _inject_setup_function_fixture _importtestmodule
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
496
_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
497
_importtestmodule
ref
function
return self._importtestmodule()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
499
collect
def
function
def collect(self) -> Iterable[Union[nodes.Item, nodes.Collector]]: if not getattr(self.obj, "__test__", _True): return [] # Avoid random getattrs and peek in the __dict__ instead. dicts = [getattr(self.obj, "__dict__", {})] if isinstance(self.obj, type): for ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
500
_inject_setup_module_fixture
ref
function
self._inject_setup_module_fixture()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
501
_inject_setup_function_fixture
ref
function
self._inject_setup_function_fixture()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
502
parsefactories
ref
function
self.session._fixturemanager.parsefactories(self)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
503
collect
ref
function
return super().collect()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
505
_inject_setup_module_fixture
def
function
def _inject_setup_module_fixture(self) -> None: """Inject a hidden autouse, module scoped fixture into the collected module object that invokes setUpModule/tearDownModule if either or both are available. Using a fixture to invoke this methods ensures we play nicely and unsurprisingly with ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
512
has_plugin
ref
function
has_nose = self.config.pluginmanager.has_plugin("nose")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/python.py
src/_pytest/python.py
513
_get_first_non_fixture_func
ref
function
setup_module = _get_first_non_fixture_func(