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/monkeypatch.py
src/_pytest/monkeypatch.py
47
MonkeyPatch
ref
function
mpatch = MonkeyPatch()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
49
undo
ref
function
mpatch.undo()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
52
resolve
def
function
def resolve(name: str) -> object: # Simplified from zope.dottedname. parts = name.split(".") used = parts.pop(0) found = __import__(used) for part in parts: used += "." + part try: found = getattr(found, part) except AttributeError: pass else:...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
76
annotated_getattr
ref
function
found = annotated_getattr(found, part, used)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
80
annotated_getattr
def
function
def annotated_getattr(obj: object, name: str, ann: str) -> object: try: obj = getattr(obj, name) except AttributeError as e: raise AttributeError( "{!r} object at {} has no attribute {!r}".format( type(obj).__name__, ann, name ) ) from e return...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
92
derive_importpath
def
function
def derive_importpath(import_path: str, raising: bool) -> Tuple[str, object]: if not isinstance(import_path, str) or "." not in import_path: raise TypeError(f"must be absolute import path string, not {import_path!r}") module, attr = import_path.rsplit(".", 1) target = resolve(module) if raising:...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
96
resolve
ref
function
target = resolve(module)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
98
annotated_getattr
ref
function
annotated_getattr(target, attr, ann=module)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
102
Notset
def
class
__repr__
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
107
Notset
ref
function
notset = Notset()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
111
MonkeyPatch
def
class
__init__ context setattr setattr setattr delattr setitem delitem setenv delenv syspath_prepend chdir undo
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
132
context
def
function
def context(cls) -> Generator["MonkeyPatch", None, None]: """Context manager that returns a new :class:`MonkeyPatch` object which undoes any patching done inside the ``with`` block upon exit. Example: .. code-block:: python import functools def test_parti...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
151
cls
ref
function
m = cls()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
155
undo
ref
function
m.undo()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
206
derive_importpath
ref
function
name, target = derive_importpath(target, raising)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
250
derive_importpath
ref
function
name, target = derive_importpath(target, raising)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
263
setitem
def
function
def setitem(self, dic: MutableMapping[K, V], name: K, value: V) -> None: """Set dictionary entry ``name`` to value.""" self._setitem.append((dic, name, dic.get(name, notset))) dic[name] = value def delitem(self, dic: MutableMapping[K, V], name: K, raising: bool = _True) -> None: ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
268
delitem
def
function
null
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
281
setenv
def
function
def setenv(self, name: str, value: str, prepend: Optional[str] = None) -> None: """Set environment variable ``name`` to ``value``. If ``prepend`` is a character, read the current environment variable value and prepend the ``value`` adjoined with the ``prepend`` character. ""...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
290
PytestWarning
ref
function
PytestWarning(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
301
setitem
ref
function
self.setitem(os.environ, name, value)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
303
delenv
def
function
null
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
310
delitem
ref
function
self.delitem(environ, name, raising=raising)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
312
syspath_prepend
def
function
def syspath_prepend(self, path) -> None: """Prepend ``path`` to ``sys.path`` list of import locations.""" if self._savesyspath is None: self._savesyspath = sys.path[:] sys.path.insert(0, str(path)) # https://github.com/pypa/setuptools/blob/d8b901bc/docs/pkg_resources.tx...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/monkeypatch.py
src/_pytest/monkeypatch.py
346
undo
def
function
def undo(self) -> None: """Undo previous changes. This call consumes the undo stack. Calling it a second time has no effect unless you do more monkeypatching after the undo call. There is generally no need to call `undo()`, since it is called automatically during tear-down....
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
50
iterparentnodeids
def
function
def iterparentnodeids(nodeid: str) -> Iterator[str]: """Return the parent node IDs of a given node ID, inclusive. For the node ID "testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_source" the result would be "" "testing" "testing/code" "testing/code/t...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
95
_check_path
def
function
def _check_path(path: Path, fspath: LEGACY_PATH) -> None: if Path(fspath) != path: raise ValueError( f"Path({fspath!r}) != {path!r}\n" "if both path and fspath are given they need to be equal" )
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
103
_imply_path
def
function
def _imply_path( node_type: Type["Node"], path: Optional[Path], fspath: Optional[LEGACY_PATH],
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
117
_check_path
ref
function
_check_path(path, fspath)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
127
NodeMeta
def
class
__call__ _create
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
135
fail
ref
function
fail(msg, pytrace=False)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
137
_create
def
function
def _create(self, *k, **kw): try: return super().__call__(*k, **kw) except TypeError: sig = signature(getattr(self, "__init__")) known_kw = {k: v for k, v in kw.items() if k in sig.parameters} from .warning_types import PytestDeprecationWarning ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
146
PytestDeprecationWarning
ref
function
PytestDeprecationWarning(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
154
Node
def
class
__init__ from_parent ihook __repr__ warn nodeid __hash__ setup teardown listchain add_marker iter_markers iter_markers_with_node get_closest_marker get_closest_marker get_closest_marker listextrakeywords listnames addfinalizer getparent _prunetraceback _repr_failure_py repr_failure
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
209
_imply_path
ref
function
self.path = _imply_path(type(self), path, fspath=fspath)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
213
NodeKeywords
ref
function
self.keywords: MutableMapping[str, Any] = NodeKeywords(self)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
233
Stash
ref
function
self.stash = Stash()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
238
from_parent
def
function
def from_parent(cls, parent: "Node", **kw): """Public constructor for Nodes. This indirection got introduced in order to enable removing the fragile logic from the node constructors. Subclasses can use ``super().from_parent(...)`` when overriding the construction. ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
253
_create
ref
function
return cls._create(parent=parent, **kw)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
256
ihook
def
function
def ihook(self): """fspath-sensitive hook proxy used to call pytest hooks.""" return self.session.gethookproxy(self.path) def __repr__(self) -> str: return "<{} {}>".format(self.__class__.__name__, getattr(self, "name", None)) def warn(self, warning: Warning) -> None: """Is...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
258
gethookproxy
ref
function
return self.session.gethookproxy(self.path)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
291
get_fslocation_from_item
ref
function
path, lineno = get_fslocation_from_item(self)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
303
nodeid
def
function
def nodeid(self) -> str: """A ::-separated string denoting its collection tree address.""" return self._nodeid def __hash__(self) -> int: return hash(self._nodeid) def setup(self) -> None: pass def teardown(self) -> None: pass def listchain(self) -> List["...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
310
setup
def
function
def setup(self) -> None: pass def teardown(self) -> None: pass def listchain(self) -> List["Node"]: """Return list of all parent collectors up to self, starting from the root of collection tree.""" chain = [] item: Optional[Node] = self while item is...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
313
teardown
def
function
def teardown(self) -> None: pass def listchain(self) -> List["Node"]: """Return list of all parent collectors up to self, starting from the root of collection tree.""" chain = [] item: Optional[Node] = self while item is not None: chain.append(item) ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
316
listchain
def
function
def listchain(self) -> List["Node"]: """Return list of all parent collectors up to self, starting from the root of collection tree.""" chain = [] item: Optional[Node] = self while item is not None: chain.append(item) item = item.parent chain.re...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
327
add_marker
def
function
def add_marker( self, marker: Union[str, MarkDecorator], append: bool = _True ) -> None: """Dynamically add a marker object to the node. :param append: Whether to append the marker, or prepend it. """ from _pytest.mark import MARK_GEN if isinstance(m...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
349
iter_markers
def
function
def iter_markers(self, name: Optional[str] = None) -> Iterator[Mark]: """Iterate over all markers of the node. :param name: If given, filter the results by the name attribute. """ return (x[1] for x in self.iter_markers_with_node(name=name)) def iter_markers_with_node( ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
354
iter_markers_with_node
ref
function
return (x[1] for x in self.iter_markers_with_node(name=name))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
356
iter_markers_with_node
def
function
def iter_markers_with_node( self, name: Optional[str] = None ) -> Iterator[Tuple["Node", Mark]]: """Iterate over all markers of the node. :param name: If given, filter the results by the name attribute. :returns: An iterator of (node, mark) tuples. """ for node i...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
364
listchain
ref
function
for node in reversed(self.listchain()):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
370
get_closest_marker
def
function
def get_closest_marker(self, name: str) -> Optional[Mark]: ... @overload def get_closest_marker(self, name: str, default: Mark) -> Mark: ... def get_closest_marker( self, name: str, default: Optional[Mark] = None ) -> Optional[Mark]: """Return the first marker match...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
374
get_closest_marker
def
function
def get_closest_marker(self, name: str, default: Mark) -> Mark: ... def get_closest_marker( self, name: str, default: Optional[Mark] = None ) -> Optional[Mark]: """Return the first marker matching the name, from closest (for example function) to farther level (for example mo...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
377
get_closest_marker
def
function
def get_closest_marker( self, name: str, default: Optional[Mark] = None ) -> Optional[Mark]: """Return the first marker matching the name, from closest (for example function) to farther level (for example module level). :param default: Fallback return value if no marker was foun...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
386
iter_markers
ref
function
return next(self.iter_markers(name=name), default)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
388
listextrakeywords
def
function
def listextrakeywords(self) -> Set[str]: """Return a set of all extra keywords in self and any parents.""" extra_keywords: Set[str] = set() for item in self.listchain(): extra_keywords.update(item.extra_keyword_matches) return extra_keywords def listnames(self) -> Li...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
391
listchain
ref
function
for item in self.listchain():
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
395
listnames
def
function
def listnames(self) -> List[str]: return [x.name for x in self.listchain()] def addfinalizer(self, fin: Callable[[], object]) -> None: """Register a function to be called when this node is finalized. This method can only be called when this node is active in a setup chain, for ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
396
listchain
ref
function
return [x.name for x in self.listchain()]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
398
addfinalizer
def
function
def addfinalizer(self, fin: Callable[[], object]) -> None: """Register a function to be called when this node is finalized. This method can only be called when this node is active in a setup chain, for example during self.setup(). """ self.session._setupstate.addfinalizer(fi...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
404
addfinalizer
ref
function
self.session._setupstate.addfinalizer(fin, self)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
406
getparent
def
function
def getparent(self, cls: Type[_NodeType]) -> Optional[_NodeType]: """Get the next parent node (including self) which is an instance of the given class.""" current: Optional[Node] = self while current and not isinstance(current, cls): current = current.parent asser...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
415
_prunetraceback
def
function
def _prunetraceback(self, excinfo: ExceptionInfo[BaseException]) -> None: pass def _repr_failure_py( self, excinfo: ExceptionInfo[BaseException], style: "Optional[_TracebackStyle]" = None, ) -> TerminalRepr: from _pytest.fixtures import FixtureLookupError if...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
418
_repr_failure_py
def
function
def _repr_failure_py( self, excinfo: ExceptionInfo[BaseException], style: "Optional[_TracebackStyle]" = None, ) -> TerminalRepr: from _pytest.fixtures import FixtureLookupError if isinstance(excinfo.value, ConftestImportFailure): excinfo = ExceptionInfo.from_...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
426
from_exc_info
ref
function
excinfo = ExceptionInfo.from_exc_info(excinfo.value.excinfo)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
431
formatrepr
ref
function
return excinfo.value.formatrepr()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
432
getoption
ref
function
if self.config.getoption("fulltrace", False):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
435
Traceback
ref
function
tb = _pytest._code.Traceback([excinfo.traceback[-1]])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
436
_prunetraceback
ref
function
self._prunetraceback(excinfo)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
443
getoption
ref
function
if self.config.getoption("tbstyle", "auto") == "short":
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
448
getoption
ref
function
if self.config.getoption("verbose", 0) > 1:
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
464
getrepr
ref
function
return excinfo.getrepr(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
467
getoption
ref
function
showlocals=self.config.getoption("showlocals", False),
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
473
repr_failure
def
function
def repr_failure( self, excinfo: ExceptionInfo[BaseException], style: "Optional[_TracebackStyle]" = None, ) -> Union[str, TerminalRepr]: """Return a representation of a collection or test failure. :param excinfo: Exception information for the failure. """ ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
482
_repr_failure_py
ref
function
return self._repr_failure_py(excinfo, style)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
485
get_fslocation_from_item
def
function
def get_fslocation_from_item(node: "Node") -> Tuple[Union[str, Path], Optional[int]]: """Try to extract the actual location from a node, depending on available attributes: * "location": a pair (path, lineno) * "obj": a Python object that the node wraps. * "fspath": just a path :rtype: A tuple of (...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
500
getfslineno
ref
function
return getfslineno(obj)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
504
Collector
def
class
collect repr_failure _prunetraceback
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
508
CollectError
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
511
collect
def
function
def collect(self) -> Iterable[Union["Item", "Collector"]]: """Return a list of children (items and collectors) for this collection node.""" raise NotImplementedError("abstract") # TODO: This omits the style= parameter which breaks Liskov Substitution. def repr_failure( # type: igno...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
517
repr_failure
def
function
def repr_failure( # type: ignore[override] self, excinfo: ExceptionInfo[BaseException] ) -> Union[str, TerminalRepr]: """Return a representation of a collection failure. :param excinfo: Exception information for the failure. """ if isinstance(excinfo.value, self.Collect...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
524
getoption
ref
function
if isinstance(excinfo.value, self.CollectError) and not self.config.getoption(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
532
getoption
ref
function
tbstyle = self.config.getoption("tbstyle", "auto")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
536
_repr_failure_py
ref
function
return self._repr_failure_py(excinfo, style=tbstyle)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
538
_prunetraceback
def
function
def _prunetraceback(self, excinfo: ExceptionInfo[BaseException]) -> None: pass def _repr_failure_py( self, excinfo: ExceptionInfo[BaseException], style: "Optional[_TracebackStyle]" = None, ) -> TerminalRepr: from _pytest.fixtures import FixtureLookupError if...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
541
cut
ref
function
ntraceback = traceback.cut(path=self.path)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
543
cut
ref
function
ntraceback = ntraceback.cut(excludepath=tracebackcutdir)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
547
_check_initialpaths_for_relpath
def
function
def _check_initialpaths_for_relpath(session: "Session", path: Path) -> Optional[str]: for initial_path in session._initialpaths: if commonpath(path, initial_path) == initial_path: rel = str(path.relative_to(initial_path)) return "" if rel == "." else rel return None
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
549
commonpath
ref
function
if commonpath(path, initial_path) == initial_path:
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
555
FSCollector
def
class
__init__ from_parent gethookproxy isinitpath
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
575
_imply_path
ref
function
path = _imply_path(type(self), path, fspath=fspath)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
596
_check_initialpaths_for_relpath
ref
function
nodeid = _check_initialpaths_for_relpath(session, path)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
611
from_parent
def
function
def from_parent( cls, parent, *, fspath: Optional[LEGACY_PATH] = None, path: Optional[Path] = None, **kw, ): """The public constructor.""" return super().from_parent(parent=parent, fspath=fspath, path=path, **kw) def gethookproxy(self, fspath:...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
620
from_parent
ref
function
return super().from_parent(parent=parent, fspath=fspath, path=path, **kw)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
622
gethookproxy
def
function
def gethookproxy(self, fspath: "os.PathLike[str]"): warnings.warn(FSCOLLECTOR_GETHOOKPROXY_ISINITPATH, stacklevel=2) return self.session.gethookproxy(fspath) def isinitpath(self, path: Union[str, "os.PathLike[str]"]) -> bool: warnings.warn(FSCOLLECTOR_GETHOOKPROXY_ISINITPATH, stacklevel...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
624
gethookproxy
ref
function
return self.session.gethookproxy(fspath)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
626
isinitpath
def
function
def isinitpath(self, path: Union[str, "os.PathLike[str]"]) -> bool: warnings.warn(FSCOLLECTOR_GETHOOKPROXY_ISINITPATH, stacklevel=2) return self.session.isinitpath(path)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
628
isinitpath
ref
function
return self.session.isinitpath(path)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
631
File
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/nodes.py
src/_pytest/nodes.py
638
Item
def
class
__init_subclass__ __init__ runtest add_report_section reportinfo location