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/pytester.py | src/_pytest/pytester.py | 114 | register | ref | function | config.pluginmanager.register(checker)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 116 | addinivalue_line | ref | function | config.addinivalue_line(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 123 | LsofFdLeakChecker | def | class | get_open_files matching_platform pytest_runtest_protocol |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 124 | get_open_files | def | function | def get_open_files(self) -> List[Tuple[str, str]]:
out = subprocess.run(
("lsof", "-Ffn0", "-p", str(os.getpid())),
stdout=subprocess.PIPE,
stderr=subprocess.DEVNULL,
check=_True,
universal_newlines=_True,
).stdout
def isopen(line:... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 133 | isopen | def | function | def isopen(line: str) -> bool:
return line.startswith("f") and (
"deleted" not in line
and "mem" not in line
and "txt" not in line
and "cwd" not in line
)
open_files = []
for line in out.split("\n"):
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 144 | isopen | ref | function | if isopen(line):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 155 | matching_platform | def | function | def matching_platform(self) -> bool:
try:
subprocess.run(("lsof", "-v"), check=_True)
except (OSError, subprocess.CalledProcessError):
return _False
else:
return _True
@hookimpl(hookwrapper=_True, tryfirst=_True)
def pytest_runtest_protocol(self, ... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 163 | hookimpl | ref | function | @hookimpl(hookwrapper=True, tryfirst=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 164 | pytest_runtest_protocol | def | function | def pytest_runtest_protocol(self, item: Item) -> Generator[None, None, None]:
lines1 = self.get_open_files()
yield
if hasattr(sys, "pypy_version_info"):
gc.collect()
lines2 = self.get_open_files()
new_fds = {t[0] for t in lines2} - {t[0] for t in lines1}
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 165 | get_open_files | ref | function | lines1 = self.get_open_files()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 169 | get_open_files | ref | function | lines2 = self.get_open_files()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 185 | warn | ref | function | item.warn(PytestWarning("\n".join(error)))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 185 | PytestWarning | ref | function | item.warn(PytestWarning("\n".join(error)))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 192 | _pytest | def | function | def _pytest(request: FixtureRequest) -> "PytestArg":
"""Return a helper which offers a gethookrecorder(hook) method which
returns a HookRecorder instance which helps to make assertions about called
hooks."""
return PytestArg(request)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 196 | PytestArg | ref | function | return PytestArg(request)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 199 | PytestArg | def | class | __init__ gethookrecorder |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 203 | gethookrecorder | def | function | def gethookrecorder(self, hook) -> "HookRecorder":
hookrecorder = HookRecorder(hook._pm)
self._request.addfinalizer(hookrecorder.finish_recording)
return hookrecorder
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 204 | HookRecorder | ref | function | hookrecorder = HookRecorder(hook._pm)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 205 | addfinalizer | ref | function | self._request.addfinalizer(hookrecorder.finish_recording)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 209 | get_public_names | def | function | def get_public_names(values: Iterable[str]) -> List[str]:
"""Only return names from iterator values without a leading underscore."""
return [x for x in values if x[0] != "_"]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 215 | RecordedHookCall | def | class | __init__ __repr__ |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 244 | HookRecorder | def | class | __init__ finish_recording getcalls assert_contains popcall getcall getreports getreports getreports getreports matchreport getfailures getfailures getfailures getfailures getfailedcollections listoutcomes countoutcomes assertoutcome clear |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 256 | check_ispytest | ref | function | check_ispytest(_ispytest)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 262 | before | def | function | def before(hook_name: str, hook_impls, kwargs) -> None:
self.calls.append(RecordedHookCall(hook_name, kwargs))
def after(outcome, hook_name: str, hook_impls, kwargs) -> None:
pass
self._undo_wrapping = pluginmanager.add_hookcall_monitoring(before, after)
def finish... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 263 | RecordedHookCall | ref | function | self.calls.append(RecordedHookCall(hook_name, kwargs))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 265 | after | def | function | def after(outcome, hook_name: str, hook_impls, kwargs) -> None:
pass
self._undo_wrapping = pluginmanager.add_hookcall_monitoring(before, after)
def finish_recording(self) -> None:
self._undo_wrapping()
def getcalls(self, names: Union[str, Iterable[str]]) -> List[RecordedHo... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 268 | add_hookcall_monitoring | ref | function | self._undo_wrapping = pluginmanager.add_hookcall_monitoring(before, after)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 270 | finish_recording | def | function | def finish_recording(self) -> None:
self._undo_wrapping()
def getcalls(self, names: Union[str, Iterable[str]]) -> List[RecordedHookCall]:
"""Get all recorded calls to hooks with the given names (or name)."""
if isinstance(names, str):
names = names.split()
return [ca... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 271 | _undo_wrapping | ref | function | self._undo_wrapping()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 273 | getcalls | def | function | def getcalls(self, names: Union[str, Iterable[str]]) -> List[RecordedHookCall]:
"""Get all recorded calls to hooks with the given names (or name)."""
if isinstance(names, str):
names = names.split()
return [call for call in self.calls if call._name in names]
def assert_conta... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 279 | assert_contains | def | function | def assert_contains(self, entries: Sequence[Tuple[str, str]]) -> None:
__tracebackhide__ = _True
i = 0
entries = list(entries)
backlocals = sys._getframe(1).f_locals
while entries:
name, check = entries.pop(0)
for ind, call in enumerate(self.calls[i:])... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 298 | fail | ref | function | fail(f"could not find {name!r} check {check!r}")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 300 | popcall | def | function | def popcall(self, name: str) -> RecordedHookCall:
__tracebackhide__ = _True
for i, call in enumerate(self.calls):
if call._name == name:
del self.calls[i]
return call
lines = [f"could not find call {name!r}, in:"]
lines.extend([" %s" % x f... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 308 | fail | ref | function | fail("\n".join(lines))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 310 | getcall | def | function | def getcall(self, name: str) -> RecordedHookCall:
values = self.getcalls(name)
assert len(values) == 1, (name, values)
return values[0]
# functionality for test reports
@overload
def getreports(
self,
names: "Literal['pytest_collectreport']",
) -> Sequence[C... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 311 | getcalls | ref | function | values = self.getcalls(name)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 318 | getreports | def | function | def getreports(
self,
names: "Literal['pytest_collectreport']",
) -> Sequence[CollectReport]:
...
@overload
def getreports(
self,
names: "Literal['pytest_runtest_logreport']",
) -> Sequence[TestReport]:
...
@overload
def getreports(
s... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 325 | getreports | def | function | def getreports(
self,
names: "Literal['pytest_collectreport']",
) -> Sequence[CollectReport]:
...
@overload
def getreports(
self,
names: "Literal['pytest_runtest_logreport']",
) -> Sequence[TestReport]:
...
@overload
def getreports(
s... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 332 | getreports | def | function | def getreports(
self,
names: "Literal['pytest_collectreport']",
) -> Sequence[CollectReport]:
...
@overload
def getreports(
self,
names: "Literal['pytest_runtest_logreport']",
) -> Sequence[TestReport]:
...
@overload
def getreports(
s... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 341 | getreports | def | function | def getreports(
self,
names: "Literal['pytest_collectreport']",
) -> Sequence[CollectReport]:
...
@overload
def getreports(
self,
names: "Literal['pytest_runtest_logreport']",
) -> Sequence[TestReport]:
...
@overload
def getreports(
s... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 348 | getcalls | ref | function | return [x.report for x in self.getcalls(names)]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 350 | matchreport | def | function | def matchreport(
self,
inamepart: str = "",
names: Union[str, Iterable[str]] = (
"pytest_runtest_logreport",
"pytest_collectreport",
),
when: Optional[str] = None,
) -> Union[CollectReport, TestReport]:
"""Return a testreport whose dotted i... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 361 | getreports | ref | function | for rep in self.getreports(names=names):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 383 | getfailures | def | function | def getfailures(
self,
names: "Literal['pytest_collectreport']",
) -> Sequence[CollectReport]:
...
@overload
def getfailures(
self,
names: "Literal['pytest_runtest_logreport']",
) -> Sequence[TestReport]:
...
@overload
def getfailures(
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 390 | getfailures | def | function | def getfailures(
self,
names: "Literal['pytest_collectreport']",
) -> Sequence[CollectReport]:
...
@overload
def getfailures(
self,
names: "Literal['pytest_runtest_logreport']",
) -> Sequence[TestReport]:
...
@overload
def getfailures(
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 397 | getfailures | def | function | def getfailures(
self,
names: "Literal['pytest_collectreport']",
) -> Sequence[CollectReport]:
...
@overload
def getfailures(
self,
names: "Literal['pytest_runtest_logreport']",
) -> Sequence[TestReport]:
...
@overload
def getfailures(
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 406 | getfailures | def | function | def getfailures(
self,
names: "Literal['pytest_collectreport']",
) -> Sequence[CollectReport]:
...
@overload
def getfailures(
self,
names: "Literal['pytest_runtest_logreport']",
) -> Sequence[TestReport]:
...
@overload
def getfailures(
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 413 | getreports | ref | function | return [rep for rep in self.getreports(names) if rep.failed]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 415 | getfailedcollections | def | function | def getfailedcollections(self) -> Sequence[CollectReport]:
return self.getfailures("pytest_collectreport")
def listoutcomes(
self,
) -> Tuple[
Sequence[TestReport],
Sequence[Union[CollectReport, TestReport]],
Sequence[Union[CollectReport, TestReport]],
]:
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 416 | getfailures | ref | function | return self.getfailures("pytest_collectreport")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 418 | listoutcomes | def | function | def listoutcomes(
self,
) -> Tuple[
Sequence[TestReport],
Sequence[Union[CollectReport, TestReport]],
Sequence[Union[CollectReport, TestReport]],
]:
passed = []
skipped = []
failed = []
for rep in self.getreports(
("pytest_collectre... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 428 | getreports | ref | function | for rep in self.getreports(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 442 | countoutcomes | def | function | def countoutcomes(self) -> List[int]:
return [len(x) for x in self.listoutcomes()]
def assertoutcome(self, passed: int = 0, skipped: int = 0, failed: int = 0) -> None:
__tracebackhide__ = _True
from _pytest.pytester_assertions import assertoutcome
outcomes = self.listoutcomes()... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 443 | listoutcomes | ref | function | return [len(x) for x in self.listoutcomes()]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 445 | assertoutcome | def | function | def assertoutcome(self, passed: int = 0, skipped: int = 0, failed: int = 0) -> None:
__tracebackhide__ = _True
from _pytest.pytester_assertions import assertoutcome
outcomes = self.listoutcomes()
assertoutcome(
outcomes,
passed=passed,
skipped=ski... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 449 | listoutcomes | ref | function | outcomes = self.listoutcomes()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 450 | assertoutcome | ref | function | assertoutcome(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 462 | linecomp | def | function | def linecomp() -> "LineComp":
"""A :class: `LineComp` instance for checking that an input linearly
contains a sequence of strings."""
return LineComp()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 465 | LineComp | ref | function | return LineComp()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 468 | fixture | ref | function | @fixture(name="LineMatcher")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 469 | LineMatcher_fixture | def | function | def LineMatcher_fixture(request: FixtureRequest) -> Type["LineMatcher"]:
"""A reference to the :class: `LineMatcher`.
This is instantiable with a list of lines (without their trailing newlines).
This is useful for testing large texts, such as the output of commands.
"""
return LineMatcher
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 479 | pytester | def | function | def pytester(request: FixtureRequest, tmp_path_factory: TempPathFactory) -> "Pytester":
"""
Facilities to write tests/configuration files, execute pytest in isolation, and match
against expected output, perfect for black-box testing of pytest plugins.
It attempts to isolate the test run from external f... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 490 | Pytester | ref | function | return Pytester(request, tmp_path_factory, _ispytest=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 494 | _sys_snapshot | def | function | def _sys_snapshot() -> Generator[None, None, None]:
snappaths = SysPathsSnapshot()
snapmods = SysModulesSnapshot()
yield
snapmods.restore()
snappaths.restore()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 495 | SysPathsSnapshot | ref | function | snappaths = SysPathsSnapshot()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 496 | SysModulesSnapshot | ref | function | snapmods = SysModulesSnapshot()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 498 | restore | ref | function | snapmods.restore()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 499 | restore | ref | function | snappaths.restore()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 503 | _config_for_test | def | function | def _config_for_test() -> Generator[Config, None, None]:
from _pytest.config import get_config
config = get_config()
yield config
config._ensure_unconfigure() # cleanup, e.g. capman closing tmpfiles.
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 506 | get_config | ref | function | config = get_config()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 508 | _ensure_unconfigure | ref | function | config._ensure_unconfigure() # cleanup, e.g. capman closing tmpfiles.
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 518 | RunResult | def | class | __init__ __repr__ parseoutcomes parse_summary_nouns assert_outcomes |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 529 | ExitCode | ref | function | self.ret: Union[int, ExitCode] = ExitCode(ret)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 537 | LineMatcher | ref | function | self.stdout = LineMatcher(outlines)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 543 | LineMatcher | ref | function | self.stderr = LineMatcher(errlines)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 554 | parseoutcomes | def | function | def parseoutcomes(self) -> Dict[str, int]:
"""Return a dictionary of outcome noun -> count from parsing the terminal
output that the test process produced.
The returned nouns will always be in plural form::
======= 1 failed, 1 passed, 1 warning, 1 error in 0.13s ====
W... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 564 | parse_summary_nouns | ref | function | return self.parse_summary_nouns(self.outlines)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 567 | parse_summary_nouns | def | function | def parse_summary_nouns(cls, lines) -> Dict[str, int]:
"""Extract the nouns from a pytest terminal summary line.
It always returns the plural noun for consistency::
======= 1 failed, 1 passed, 1 warning, 1 error in 0.13s ====
Will return ``{"failed": 1, "passed": 1, "warnings"... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 590 | assert_outcomes | def | function | def assert_outcomes(
self,
passed: int = 0,
skipped: int = 0,
failed: int = 0,
errors: int = 0,
xpassed: int = 0,
xfailed: int = 0,
warnings: int = 0,
deselected: int = 0,
) -> None:
"""Assert that the specified outcomes appear with... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 606 | parseoutcomes | ref | function | outcomes = self.parseoutcomes()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 607 | assert_outcomes | ref | function | assert_outcomes(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 620 | CwdSnapshot | def | class | __init__ restore |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 624 | restore | def | function | def restore(self) -> None:
os.chdir(self.__saved)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 628 | SysModulesSnapshot | def | class | __init__ restore |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 633 | restore | def | function | def restore(self) -> None:
os.chdir(self.__saved)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 636 | __preserve | ref | function | (k, m) for k, m in sys.modules.items() if self.__preserve(k)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 642 | SysPathsSnapshot | def | class | __init__ restore |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 646 | restore | def | function | def restore(self) -> None:
os.chdir(self.__saved)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 651 | Pytester | def | class | __init__ path __repr__ _finalize __take_sys_modules_snapshot make_hook_recorder chdir _makefile makefile makeconftest makeini getinicfg makepyprojecttoml makepyfile maketxtfile syspathinsert mkdir mkpydir copy_example getnode getpathnode genitems runitem inline_runsource inline_genitems inline_run runpytest_inprocess r... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 684 | check_ispytest | ref | function | check_ispytest(_ispytest)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 694 | mktemp | ref | function | self._path: Path = tmp_path_factory.mktemp(name, numbered=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 696 | CwdSnapshot | ref | function | self._cwd_snapshot = CwdSnapshot()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 697 | SysPathsSnapshot | ref | function | self._sys_path_snapshot = SysPathsSnapshot()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 698 | __take_sys_modules_snapshot | ref | function | self._sys_modules_snapshot = self.__take_sys_modules_snapshot()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 700 | addfinalizer | ref | function | self._request.addfinalizer(self._finalize)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 701 | getoption | ref | function | self._method = self._request.config.getoption("--runpytest")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 702 | mktemp | ref | function | self._test_tmproot = tmp_path_factory.mktemp(f"tmp-{name}", numbered=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 704 | MonkeyPatch | ref | function | self._monkeypatch = mp = MonkeyPatch()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 705 | setenv | ref | function | mp.setenv("PYTEST_DEBUG_TEMPROOT", str(self._test_tmproot))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 707 | delenv | ref | function | mp.delenv("TOX_ENV_DIR", raising=False)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.