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/testing/test_config.py | testing/test_config.py | 2,100 | test_debug_help | def | function | def test_debug_help(self, pytester: Pytester) -> None:
result = pytester.runpytest("-h")
result.stdout.fnmatch_lines(
[
"*store internal tracing debug information in this log*",
"*This file is opened with 'w' and truncated as a result*",
"*... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py | testing/test_config.py | 2,101 | runpytest | ref | function | result = pytester.runpytest("-h")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py | testing/test_config.py | 2,102 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 19 | ConftestWithSetinitial | def | function | def ConftestWithSetinitial(path) -> PytestPluginManager:
conftest = PytestPluginManager()
conftest_setinitial(conftest, [path])
return conftest
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 20 | PytestPluginManager | ref | function | conftest = PytestPluginManager()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 21 | conftest_setinitial | ref | function | conftest_setinitial(conftest, [path])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 25 | conftest_setinitial | def | function | def conftest_setinitial(
conftest: PytestPluginManager, args, confcutdir: Optional["os.PathLike[str]"] = None
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 37 | _set_initial_conftests | ref | function | conftest._set_initial_conftests(namespace, rootpath=Path(args[0]))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 40 | usefixtures | ref | function | @pytest.mark.usefixtures("_sys_snapshot")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 41 | TestConftestValueAccessGlobal | def | class | basedir test_basic_init test_immediate_initialiation_and_incremental_are_the_same test_value_access_not_existing test_value_access_by_path test_value_access_with_confmod |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 42 | fixture | ref | function | @pytest.fixture(scope="module", params=["global", "inpackage"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 43 | basedir | def | function | def basedir(
self, request, tmp_path_factory: TempPathFactory
) -> Generator[Path, None, None]:
tmp_path = tmp_path_factory.mktemp("basedir", numbered=_True)
tmp_path.joinpath("adir/b").mkdir(parents=_True)
tmp_path.joinpath("adir/conftest.py").write_text("a=1 ; Directory = 3")
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 46 | mktemp | ref | function | tmp_path = tmp_path_factory.mktemp("basedir", numbered=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 56 | test_basic_init | def | function | def test_basic_init(self, basedir: Path) -> None:
conftest = PytestPluginManager()
p = basedir / "adir"
assert (
conftest._rget_with_confmod("a", p, importmode="prepend", rootpath=basedir)[
1
]
== 1
)
def test_immediate_initial... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 57 | PytestPluginManager | ref | function | conftest = PytestPluginManager()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 60 | _rget_with_confmod | ref | function | conftest._rget_with_confmod("a", p, importmode="prepend", rootpath=basedir)[
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 66 | test_immediate_initialiation_and_incremental_are_the_same | def | function | def test_immediate_initialiation_and_incremental_are_the_same(
self, basedir: Path
) -> None:
conftest = PytestPluginManager()
assert not len(conftest._dirpath2confmods)
conftest._getconftestmodules(
basedir, importmode="prepend", rootpath=Path(basedir)
)
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 69 | PytestPluginManager | ref | function | conftest = PytestPluginManager()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 71 | _getconftestmodules | ref | function | conftest._getconftestmodules(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 76 | _getconftestmodules | ref | function | conftest._getconftestmodules(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 80 | _getconftestmodules | ref | function | conftest._getconftestmodules(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 85 | test_value_access_not_existing | def | function | def test_value_access_not_existing(self, basedir: Path) -> None:
conftest = ConftestWithSetinitial(basedir)
with pytest.raises(KeyError):
conftest._rget_with_confmod(
"a", basedir, importmode="prepend", rootpath=Path(basedir)
)
def test_value_access_by_pa... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 86 | ConftestWithSetinitial | ref | function | conftest = ConftestWithSetinitial(basedir)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 87 | raises | ref | function | with pytest.raises(KeyError):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 88 | _rget_with_confmod | ref | function | conftest._rget_with_confmod(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 92 | test_value_access_by_path | def | function | def test_value_access_by_path(self, basedir: Path) -> None:
conftest = ConftestWithSetinitial(basedir)
adir = basedir / "adir"
assert (
conftest._rget_with_confmod(
"a", adir, importmode="prepend", rootpath=basedir
)[1]
== 1
)
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 93 | ConftestWithSetinitial | ref | function | conftest = ConftestWithSetinitial(basedir)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 96 | _rget_with_confmod | ref | function | conftest._rget_with_confmod(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 102 | _rget_with_confmod | ref | function | conftest._rget_with_confmod(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 108 | test_value_access_with_confmod | def | function | def test_value_access_with_confmod(self, basedir: Path) -> None:
startdir = basedir / "adir" / "b"
startdir.joinpath("xx").mkdir()
conftest = ConftestWithSetinitial(startdir)
mod, value = conftest._rget_with_confmod(
"a", startdir, importmode="prepend", rootpath=Path(base... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 111 | ConftestWithSetinitial | ref | function | conftest = ConftestWithSetinitial(startdir)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 112 | _rget_with_confmod | ref | function | mod, value = conftest._rget_with_confmod(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 121 | test_conftest_in_nonpkg_with_init | def | function | def test_conftest_in_nonpkg_with_init(tmp_path: Path, _sys_snapshot) -> None:
tmp_path.joinpath("adir-1.0/b").mkdir(parents=_True)
tmp_path.joinpath("adir-1.0/conftest.py").write_text("a=1 ; Directory = 3")
tmp_path.joinpath("adir-1.0/b/conftest.py").write_text("b=2 ; a = 1.5")
tmp_path.joinpath("adir-1... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 127 | ConftestWithSetinitial | ref | function | ConftestWithSetinitial(tmp_path.joinpath("adir-1.0", "b"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 130 | test_doubledash_considered | def | function | def test_doubledash_considered(pytester: Pytester) -> None:
conf = pytester.mkdir("--option")
conf.joinpath("conftest.py").touch()
conftest = PytestPluginManager()
conftest_setinitial(conftest, [conf.name, conf.name])
values = conftest._getconftestmodules(
conf, importmode="prepend", rootpat... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 133 | PytestPluginManager | ref | function | conftest = PytestPluginManager()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 134 | conftest_setinitial | ref | function | conftest_setinitial(conftest, [conf.name, conf.name])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 135 | _getconftestmodules | ref | function | values = conftest._getconftestmodules(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 141 | test_issue151_load_all_conftests | def | function | def test_issue151_load_all_conftests(pytester: Pytester) -> None:
names = "code proj src".split()
for name in names:
p = pytester.mkdir(name)
p.joinpath("conftest.py").touch()
conftest = PytestPluginManager()
conftest_setinitial(conftest, names)
d = list(conftest._conftestpath2mod.v... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 147 | PytestPluginManager | ref | function | conftest = PytestPluginManager()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 148 | conftest_setinitial | ref | function | conftest_setinitial(conftest, names)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 153 | test_conftest_global_import | def | function | def test_conftest_global_import(pytester: Pytester) -> None:
pytester.makeconftest("x=3")
p = pytester.makepyfile(
"""
from pathlib import Path
import pytest
from _pytest.config import PytestPluginManager
conf = PytestPluginManager()
mod = conf._importconftest(Pat... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 154 | makeconftest | ref | function | pytester.makeconftest("x=3")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 155 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 176 | runpython | ref | function | res = pytester.runpython(p)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 180 | test_conftestcutdir | def | function | def test_conftestcutdir(pytester: Pytester) -> None:
conf = pytester.makeconftest("")
p = pytester.mkdir("x")
conftest = PytestPluginManager()
conftest_setinitial(conftest, [pytester.path], confcutdir=p)
values = conftest._getconftestmodules(
p, importmode="prepend", rootpath=pytester.path
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 181 | makeconftest | ref | function | conf = pytester.makeconftest("")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 183 | PytestPluginManager | ref | function | conftest = PytestPluginManager()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 184 | conftest_setinitial | ref | function | conftest_setinitial(conftest, [pytester.path], confcutdir=p)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 185 | _getconftestmodules | ref | function | values = conftest._getconftestmodules(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 189 | _getconftestmodules | ref | function | values = conftest._getconftestmodules(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 195 | _importconftest | ref | function | conftest._importconftest(conf, importmode="prepend", rootpath=pytester.path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 196 | _getconftestmodules | ref | function | values = conftest._getconftestmodules(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 201 | _getconftestmodules | ref | function | values = conftest._getconftestmodules(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 208 | test_conftestcutdir_inplace_considered | def | function | def test_conftestcutdir_inplace_considered(pytester: Pytester) -> None:
conf = pytester.makeconftest("")
conftest = PytestPluginManager()
conftest_setinitial(conftest, [conf.parent], confcutdir=conf.parent)
values = conftest._getconftestmodules(
conf.parent, importmode="prepend", rootpath=pytest... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 209 | makeconftest | ref | function | conf = pytester.makeconftest("")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 210 | PytestPluginManager | ref | function | conftest = PytestPluginManager()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 211 | conftest_setinitial | ref | function | conftest_setinitial(conftest, [conf.parent], confcutdir=conf.parent)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 212 | _getconftestmodules | ref | function | values = conftest._getconftestmodules(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 219 | parametrize | ref | function | @pytest.mark.parametrize("name", "test tests whatever .dotdir".split())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 220 | test_setinitial_conftest_subdirs | def | function | def test_setinitial_conftest_subdirs(pytester: Pytester, name: str) -> None:
sub = pytester.mkdir(name)
subconftest = sub.joinpath("conftest.py")
subconftest.touch()
conftest = PytestPluginManager()
conftest_setinitial(conftest, [sub.parent], confcutdir=pytester.path)
key = subconftest.resolve()... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 224 | PytestPluginManager | ref | function | conftest = PytestPluginManager()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 225 | conftest_setinitial | ref | function | conftest_setinitial(conftest, [sub.parent], confcutdir=pytester.path)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 235 | test_conftest_confcutdir | def | function | def test_conftest_confcutdir(pytester: Pytester) -> None:
pytester.makeconftest("assert 0")
x = pytester.mkdir("x")
x.joinpath("conftest.py").write_text(
textwrap.dedent(
"""\
def pytest_addoption(parser):
parser.addoption("--xyz", action="store_true")
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 236 | makeconftest | ref | function | pytester.makeconftest("assert 0")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 246 | runpytest | ref | function | result = pytester.runpytest("-h", "--confcutdir=%s" % x, x)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 247 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*--xyz*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 248 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*warning: could not load initial*")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 251 | test_conftest_symlink | def | function | def test_conftest_symlink(pytester: Pytester) -> None:
"""`conftest.py` discovery follows normal path resolution and does not resolve symlinks."""
# Structure:
# /real
# /real/conftest.py
# /real/app
# /real/app/tests
# /real/app/tests/test_foo.py
# Links:
# /symlinktests -> /real/a... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 267 | symlink_or_skip | ref | function | symlink_or_skip(realtests, pytester.path.joinpath("symlinktests"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 268 | symlink_or_skip | ref | function | symlink_or_skip(real, pytester.path.joinpath("symlink"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 269 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 287 | runpytest | ref | function | result = pytester.runpytest("-vs", "symlinktests")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 288 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*fixture 'fixture' not found*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 292 | runpytest | ref | function | result = pytester.runpytest("-vs", "symlink")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 296 | test_conftest_symlink_files | def | function | def test_conftest_symlink_files(pytester: Pytester) -> None:
"""Symlinked conftest.py are found when pytest is executed in a directory with symlinked
files."""
real = pytester.mkdir("real")
source = {
"app/test_foo.py": "def test1(fixture): pass",
"app/__init__.py": "",
"app/conf... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 315 | makepyfile | ref | function | pytester.makepyfile(**{"real/%s" % k: v for k, v in source.items()})
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 322 | symlink_or_skip | ref | function | symlink_or_skip(real.joinpath(f), build.joinpath(f))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 324 | runpytest | ref | function | result = pytester.runpytest("-vs", "app/test_foo.py")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 325 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*conftest_loaded*", "PASSED"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 329 | skipif | ref | function | @pytest.mark.skipif(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 330 | normcase | ref | function | os.path.normcase("x") != os.path.normcase("X"),
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 330 | normcase | ref | function | os.path.normcase("x") != os.path.normcase("X"),
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 333 | test_conftest_badcase | def | function | def test_conftest_badcase(pytester: Pytester) -> None:
"""Check conftest.py loading when directory casing is wrong (#5792)."""
pytester.path.joinpath("JenkinsRoot/test").mkdir(parents=_True)
source = {"setup.py": "", "test/__init__.py": "", "test/conftest.py": ""}
pytester.makepyfile(**{"JenkinsRoot/%s"... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 337 | makepyfile | ref | function | pytester.makepyfile(**{"JenkinsRoot/%s" % k: v for k, v in source.items()})
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 340 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 344 | test_conftest_uppercase | def | function | def test_conftest_uppercase(pytester: Pytester) -> None:
"""Check conftest.py whose qualified name contains uppercase characters (#5819)"""
source = {"__init__.py": "", "Foo/conftest.py": "", "Foo/__init__.py": ""}
pytester.makepyfile(**source)
os.chdir(pytester.path)
result = pytester.runpytest()
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 347 | makepyfile | ref | function | pytester.makepyfile(**source)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 350 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 354 | test_no_conftest | def | function | def test_no_conftest(pytester: Pytester) -> None:
pytester.makeconftest("assert 0")
result = pytester.runpytest("--noconftest")
assert result.ret == ExitCode.NO_TESTS_COLLECTED
result = pytester.runpytest()
assert result.ret == ExitCode.USAGE_ERROR
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 355 | makeconftest | ref | function | pytester.makeconftest("assert 0")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 356 | runpytest | ref | function | result = pytester.runpytest("--noconftest")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 359 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 363 | test_conftest_existing_junitxml | def | function | def test_conftest_existing_junitxml(pytester: Pytester) -> None:
x = pytester.mkdir("tests")
x.joinpath("conftest.py").write_text(
textwrap.dedent(
"""\
def pytest_addoption(parser):
parser.addoption("--xyz", action="store_true")
"""
)
)
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 373 | makefile | ref | function | pytester.makefile(ext=".xml", junit="") # Writes junit.xml
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 374 | runpytest | ref | function | result = pytester.runpytest("-h", "--junitxml", "junit.xml")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 375 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*--xyz*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 378 | test_conftest_import_order | def | function | def test_conftest_import_order(pytester: Pytester, monkeypatch: MonkeyPatch) -> None:
ct1 = pytester.makeconftest("")
sub = pytester.mkdir("sub")
ct2 = sub / "conftest.py"
ct2.write_text("")
def impct(p, importmode, root):
return p
conftest = PytestPluginManager()
conftest._confcut... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 379 | makeconftest | ref | function | ct1 = pytester.makeconftest("")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_conftest.py | testing/test_conftest.py | 384 | impct | def | function | def impct(p, importmode, root):
return p
conftest = PytestPluginManager()
conftest._confcutdir = pytester.path
monkeypatch.setattr(conftest, "_importconftest", impct)
mods = cast(
List[Path],
conftest._getconftestmodules(sub, importmode="prepend", rootpath=pytester.path),
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.