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 | 709 | delenv | ref | function | mp.delenv("PYTEST_ADDOPTS", raising=False)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 712 | setenv | ref | function | mp.setenv("HOME", tmphome)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 713 | setenv | ref | function | mp.setenv("USERPROFILE", tmphome)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 715 | setenv | ref | function | mp.setenv("PY_COLORS", "0")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 718 | path | def | function | def path(self) -> Path:
"""Temporary directory where files are created and pytest is executed."""
return self._path
def __repr__(self) -> str:
return f"<Pytester {self.path!r}>"
def _finalize(self) -> None:
"""
Clean up global state artifacts.
Some methods ... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 725 | _finalize | def | function | def _finalize(self) -> None:
"""
Clean up global state artifacts.
Some methods modify the global interpreter state and this tries to
clean this up. It does not remove the temporary directory however so
it can be looked at after the test run has finished.
"""
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 733 | restore | ref | function | self._sys_modules_snapshot.restore()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 734 | restore | ref | function | self._sys_path_snapshot.restore()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 735 | restore | ref | function | self._cwd_snapshot.restore()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 736 | undo | ref | function | self._monkeypatch.undo()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 738 | __take_sys_modules_snapshot | def | function | def __take_sys_modules_snapshot(self) -> SysModulesSnapshot:
# Some zope modules used by twisted-related tests keep internal state
# and can't be deleted; we had some trouble in the past with
# `zope.interface` for example.
#
# Preserve readline due to https://bugs.python.org... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 745 | preserve_module | def | function | def preserve_module(name):
return name.startswith(("zope", "readline"))
return SysModulesSnapshot(preserve=preserve_module)
def make_hook_recorder(self, pluginmanager: PytestPluginManager) -> HookRecorder:
"""Create a new :py:class:`HookRecorder` for a PluginManager."""
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 748 | SysModulesSnapshot | ref | function | return SysModulesSnapshot(preserve=preserve_module)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 750 | make_hook_recorder | def | function | def make_hook_recorder(self, pluginmanager: PytestPluginManager) -> HookRecorder:
"""Create a new :py:class:`HookRecorder` for a PluginManager."""
pluginmanager.reprec = reprec = HookRecorder(pluginmanager, _ispytest=_True)
self._request.addfinalizer(reprec.finish_recording)
return r... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 752 | HookRecorder | ref | function | pluginmanager.reprec = reprec = HookRecorder(pluginmanager, _ispytest=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 753 | addfinalizer | ref | function | self._request.addfinalizer(reprec.finish_recording)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 763 | _makefile | def | function | def _makefile(
self,
ext: str,
lines: Sequence[Union[Any, bytes]],
files: Dict[str, str],
encoding: str = "utf-8",
) -> Path:
items = list(files.items())
if ext and not ext.startswith("."):
raise ValueError(
f"pytester.makefile... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 777 | to_text | def | function | def to_text(s: Union[Any, bytes]) -> str:
return s.decode(encoding) if isinstance(s, bytes) else str(s)
if lines:
source = "\n".join(to_text(x) for x in lines)
basename = self._name
items.insert(0, (basename, source))
ret = None
for basen... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 778 | decode | ref | function | return s.decode(encoding) if isinstance(s, bytes) else str(s)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 781 | to_text | ref | function | source = "\n".join(to_text(x) for x in lines)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 789 | Source | ref | function | source_ = Source(value)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 790 | to_text | ref | function | source = "\n".join(to_text(line) for line in source_.lines)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 797 | makefile | def | function | def makefile(self, ext: str, *args: str, **kwargs: str) -> Path:
r"""Create new text file(s) in the test directory.
:param str ext:
The extension the file(s) should use, including the dot, e.g. `.py`.
:param args:
All args are treated as strings and joined using newl... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 825 | _makefile | ref | function | return self._makefile(ext, args, kwargs)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 827 | makeconftest | def | function | def makeconftest(self, source: str) -> Path:
"""Write a contest.py file with 'source' as contents."""
return self.makepyfile(conftest=source)
def makeini(self, source: str) -> Path:
"""Write a tox.ini file with 'source' as contents."""
return self.makefile(".ini", tox=source)
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 829 | makepyfile | ref | function | return self.makepyfile(conftest=source)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 831 | makeini | def | function | def makeini(self, source: str) -> Path:
"""Write a tox.ini file with 'source' as contents."""
return self.makefile(".ini", tox=source)
def getinicfg(self, source: str) -> SectionWrapper:
"""Return the pytest section from the tox.ini config file."""
p = self.makeini(source)
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 833 | makefile | ref | function | return self.makefile(".ini", tox=source)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 835 | getinicfg | def | function | def getinicfg(self, source: str) -> SectionWrapper:
"""Return the pytest section from the tox.ini config file."""
p = self.makeini(source)
return IniConfig(str(p))["pytest"]
def makepyprojecttoml(self, source: str) -> Path:
"""Write a pyproject.toml file with 'source' as content... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 837 | makeini | ref | function | p = self.makeini(source)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 838 | IniConfig | ref | function | return IniConfig(str(p))["pytest"]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 840 | makepyprojecttoml | def | function | def makepyprojecttoml(self, source: str) -> Path:
"""Write a pyproject.toml file with 'source' as contents.
.. versionadded:: 6.0
"""
return self.makefile(".toml", pyproject=source)
def makepyfile(self, *args, **kwargs) -> Path:
r"""Shortcut for .makefile() with a .py e... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 845 | makefile | ref | function | return self.makefile(".toml", pyproject=source)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 847 | makepyfile | def | function | def makepyfile(self, *args, **kwargs) -> Path:
r"""Shortcut for .makefile() with a .py extension.
Defaults to the test name with a '.py' extension, e.g test_foobar.py, overwriting
existing files.
Examples:
.. code-block:: python
def test_something(pytester):
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 865 | _makefile | ref | function | return self._makefile(".py", args, kwargs)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 867 | maketxtfile | def | function | def maketxtfile(self, *args, **kwargs) -> Path:
r"""Shortcut for .makefile() with a .txt extension.
Defaults to the test name with a '.txt' extension, e.g test_foobar.txt, overwriting
existing files.
Examples:
.. code-block:: python
def test_something(pytester... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 885 | _makefile | ref | function | return self._makefile(".txt", args, kwargs)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 887 | syspathinsert | def | function | def syspathinsert(
self, path: Optional[Union[str, "os.PathLike[str]"]] = None
) -> None:
"""Prepend a directory to sys.path, defaults to :attr:`path`.
This is undone automatically when this object dies at the end of each
test.
"""
if path is None:
pa... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 898 | syspath_prepend | ref | function | self._monkeypatch.syspath_prepend(str(path))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 906 | mkpydir | def | function | def mkpydir(self, name: str) -> Path:
"""Create a new python package.
This creates a (sub)directory with an empty ``__init__.py`` file so it
gets recognised as a Python package.
"""
p = self.path / name
p.mkdir()
p.joinpath("__init__.py").touch()
retu... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 917 | copy_example | def | function | def copy_example(self, name: Optional[str] = None) -> Path:
"""Copy file from project's directory into the testdir.
:param str name: The name of the file to copy.
:return: path to the copied directory (inside ``self.path``).
"""
example_dir = self._request.config.getini("py... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 924 | getini | ref | function | example_dir = self._request.config.getini("pytester_example_dir")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 929 | iter_markers | ref | function | for extra_element in self._request.node.iter_markers("pytester_example_path"):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 961 | getnode | def | function | def getnode(
self, config: Config, arg: Union[str, "os.PathLike[str]"]
) -> Optional[Union[Collector, Item]]:
"""Return the collection node of a file.
:param pytest.Config config:
A pytest config.
See :py:meth:`parseconfig` and :py:meth:`parseconfigure` for creatin... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 972 | from_config | ref | function | session = Session.from_config(config)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 974 | abspath | ref | function | p = Path(os.path.abspath(arg))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 975 | pytest_sessionstart | ref | function | config.hook.pytest_sessionstart(session=session)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 976 | perform_collect | ref | function | res = session.perform_collect([str(p)], genitems=False)[0]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 977 | pytest_sessionfinish | ref | function | config.hook.pytest_sessionfinish(session=session, exitstatus=ExitCode.OK)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 980 | getpathnode | def | function | def getpathnode(self, path: Union[str, "os.PathLike[str]"]):
"""Return the collection node of a file.
This is like :py:meth:`getnode` but uses :py:meth:`parseconfigure` to
create the (configured) pytest Config instance.
:param os.PathLike[str] path: Path to the file.
"""
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 989 | parseconfigure | ref | function | config = self.parseconfigure(path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 990 | from_config | ref | function | session = Session.from_config(config)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 991 | bestrelpath | ref | function | x = bestrelpath(session.path, path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 992 | pytest_sessionstart | ref | function | config.hook.pytest_sessionstart(session=session)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 993 | perform_collect | ref | function | res = session.perform_collect([x], genitems=False)[0]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 994 | pytest_sessionfinish | ref | function | config.hook.pytest_sessionfinish(session=session, exitstatus=ExitCode.OK)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 997 | genitems | def | function | def genitems(self, colitems: Sequence[Union[Item, Collector]]) -> List[Item]:
"""Generate all test items from a collection node.
This recurses into the collection node and returns a list of all the
test items contained within.
"""
session = colitems[0].session
result... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,006 | genitems | ref | function | result.extend(session.genitems(colitem))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,009 | runitem | def | function | def runitem(self, source: str) -> Any:
"""Run the "test_func" Item.
The calling test instance (class containing the test method) must
provide a ``.getrunner()`` method which should return a runner which
can run the test protocol for a single item, e.g.
:py:func:`_pytest.runn... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,018 | getitem | ref | function | item = self.getitem(source)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,021 | getrunner | ref | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,022 | runner | ref | function | return runner(item)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,024 | inline_runsource | def | function | def inline_runsource(self, source: str, *cmdlineargs) -> HookRecorder:
"""Run a test module in process using ``pytest.main()``.
This run writes "source" into a temporary file and runs
``pytest.main()`` on it, returning a :py:class:`HookRecorder` instance
for the result.
:pa... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,034 | makepyfile | ref | function | p = self.makepyfile(source)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,036 | inline_run | ref | function | return self.inline_run(*values)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,038 | inline_genitems | def | function | def inline_genitems(self, *args) -> Tuple[List[Item], HookRecorder]:
"""Run ``pytest.main(['--collectonly'])`` in-process.
Runs the :py:func:`pytest.main` function to run all of pytest inside
the test process itself like :py:meth:`inline_run`, but returns a
tuple of the collected it... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,045 | inline_run | ref | function | rec = self.inline_run("--collect-only", *args)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,046 | getcalls | ref | function | items = [x.item for x in rec.getcalls("pytest_itemcollected")]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,049 | inline_run | def | function | def inline_run(
self,
*args: Union[str, "os.PathLike[str]"],
plugins=(),
no_reraise_ctrlc: bool = _False,
) -> HookRecorder:
"""Run ``pytest.main()`` in-process, returning a HookRecorder.
Runs the :py:func:`pytest.main` function to run all of pytest inside
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,083 | __take_sys_modules_snapshot | ref | function | finalizers.append(self.__take_sys_modules_snapshot().restore)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,084 | SysPathsSnapshot | ref | function | finalizers.append(SysPathsSnapshot().restore)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,094 | Collect | def | class | pytest_configure |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,095 | pytest_configure | def | function | def pytest_configure(x, config: Config) -> None:
rec.append(self.make_hook_recorder(config.pluginmanager))
plugins.append(Collect())
ret = main([str(x) for x in args], plugins=plugins)
if len(rec) == 1:
reprec = rec.pop()
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,096 | make_hook_recorder | ref | function | rec.append(self.make_hook_recorder(config.pluginmanager))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,098 | Collect | ref | function | plugins.append(Collect())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,099 | main | ref | function | ret = main([str(x) for x in args], plugins=plugins)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,104 | reprec | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,112 | getcalls | ref | function | calls = reprec.getcalls("pytest_keyboard_interrupt")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,118 | finalizer | ref | function | finalizer()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,120 | runpytest_inprocess | def | function | def runpytest_inprocess(
self, *args: Union[str, "os.PathLike[str]"], **kwargs: Any
) -> RunResult:
"""Return result of running pytest in-process, providing a similar
interface to what self.runpytest() provides."""
syspathinsert = kwargs.pop("syspathinsert", _False)
if s... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,128 | syspathinsert | ref | function | self.syspathinsert()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,129 | time | ref | function | now = timing.time()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,130 | _get_multicapture | ref | function | capture = _get_multicapture("sys")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,131 | start_capturing | ref | function | capture.start_capturing()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,134 | inline_run | ref | function | reprec = self.inline_run(*args, **kwargs)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,138 | ExitCode | ref | function | ret = ExitCode(e.args[0])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,142 | reprec | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,148 | reprec | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,149 | ExitCode | ref | function | ret = ExitCode(3)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,152 | readouterr | ref | function | out, err = capture.readouterr()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,153 | stop_capturing | ref | function | capture.stop_capturing()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,158 | RunResult | ref | function | res = RunResult(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,159 | time | ref | function | reprec.ret, out.splitlines(), err.splitlines(), timing.time() - now
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,164 | runpytest | def | function | def runpytest(
self, *args: Union[str, "os.PathLike[str]"], **kwargs: Any
) -> RunResult:
"""Run pytest inline or in a subprocess, depending on the command line
option "--runpytest" and return a :py:class:`~pytest.RunResult`."""
new_args = self._ensure_basetemp(args)
if s... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,169 | _ensure_basetemp | ref | function | new_args = self._ensure_basetemp(args)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,171 | runpytest_inprocess | ref | function | return self.runpytest_inprocess(*new_args, **kwargs)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,173 | runpytest_subprocess | ref | function | return self.runpytest_subprocess(*new_args, **kwargs)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,176 | _ensure_basetemp | def | function | def _ensure_basetemp(
self, args: Sequence[Union[str, "os.PathLike[str]"]]
) -> List[Union[str, "os.PathLike[str]"]]:
new_args = list(args)
for x in new_args:
if str(x).startswith("--basetemp"):
break
else:
new_args.append("--basetemp=%s" %... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,187 | parseconfig | def | function | def parseconfig(self, *args: Union[str, "os.PathLike[str]"]) -> Config:
"""Return a new pytest Config instance from given commandline args.
This invokes the pytest bootstrapping code in _pytest.config to create
a new :py:class:`_pytest.core.PluginManager` and call the
pytest_cmdline... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/pytester.py | src/_pytest/pytester.py | 1,200 | _ensure_basetemp | ref | function | new_args = self._ensure_basetemp(args)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.