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
1,291
_get_plugin_specs_as_list
ref
function
assert _get_plugin_specs_as_list("foo") == ["foo"]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,292
_get_plugin_specs_as_list
ref
function
assert _get_plugin_specs_as_list("foo,bar") == ["foo", "bar"]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,293
_get_plugin_specs_as_list
ref
function
assert _get_plugin_specs_as_list(["foo", "bar"]) == ["foo", "bar"]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,294
_get_plugin_specs_as_list
ref
function
assert _get_plugin_specs_as_list(("foo", "bar")) == ["foo", "bar"]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,297
test_collect_pytest_prefix_bug_integration
def
function
def test_collect_pytest_prefix_bug_integration(pytester: Pytester) -> None: """Integration test for issue #3775""" p = pytester.copy_example("config/collect_pytest_prefix") result = pytester.runpytest(p) result.stdout.fnmatch_lines(["* 1 passed *"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,299
copy_example
ref
function
p = pytester.copy_example("config/collect_pytest_prefix")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,300
runpytest
ref
function
result = pytester.runpytest(p)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,301
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["* 1 passed *"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,304
test_collect_pytest_prefix_bug
def
function
def test_collect_pytest_prefix_bug(pytestconfig): """Ensure we collect only actual functions from conftest files (#3775)""" class Dummy: class pytest_something: pass pm = pytestconfig.pluginmanager assert pm.parse_hookimpl_opts(Dummy(), "pytest_something") is None
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,307
Dummy
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,308
pytest_something
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,312
parse_hookimpl_opts
ref
function
assert pm.parse_hookimpl_opts(Dummy(), "pytest_something") is None
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,312
Dummy
ref
function
assert pm.parse_hookimpl_opts(Dummy(), "pytest_something") is None
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,315
TestRootdir
def
class
test_simple_noini test_with_ini test_pytestini_overrides_empty_other test_setuppy_fallback test_nothing test_with_specific_inifile test_explicit_config_file_sets_rootdir test_with_arg_outside_cwd_without_inifile test_with_arg_outside_cwd_with_inifile test_with_non_dir_arg test_with_existing_file_in_subdir test_with_con...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,316
test_simple_noini
def
function
def test_simple_noini(self, tmp_path: Path, monkeypatch: MonkeyPatch) -> None: assert get_common_ancestor([tmp_path]) == tmp_path a = tmp_path / "a" a.mkdir() assert get_common_ancestor([a, tmp_path]) == tmp_path assert get_common_ancestor([tmp_path, a]) == tmp_path m...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,317
get_common_ancestor
ref
function
assert get_common_ancestor([tmp_path]) == tmp_path
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,320
get_common_ancestor
ref
function
assert get_common_ancestor([a, tmp_path]) == tmp_path
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,321
get_common_ancestor
ref
function
assert get_common_ancestor([tmp_path, a]) == tmp_path
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,323
get_common_ancestor
ref
function
assert get_common_ancestor([]) == tmp_path
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,325
get_common_ancestor
ref
function
assert get_common_ancestor([no_path]) == tmp_path
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,326
get_common_ancestor
ref
function
assert get_common_ancestor([no_path / "a"]) == tmp_path
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,328
parametrize
ref
function
@pytest.mark.parametrize(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,331
param
ref
function
pytest.param("pytest.ini", "[pytest]\nx=10", id="pytest.ini"),
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,332
param
ref
function
pytest.param(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,335
param
ref
function
pytest.param("tox.ini", "[pytest]\nx=10", id="tox.ini"),
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,336
param
ref
function
pytest.param("setup.cfg", "[tool:pytest]\nx=10", id="setup.cfg"),
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,339
test_with_ini
def
function
def test_with_ini(self, tmp_path: Path, name: str, contents: str) -> None: inipath = tmp_path / name inipath.write_text(contents, "utf-8") a = tmp_path / "a" a.mkdir() b = a / "b" b.mkdir() for args in ([str(tmp_path)], [str(a)], [str(b)]): rootpa...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,348
determine_setup
ref
function
rootpath, parsed_inipath, _ = determine_setup(None, args)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,351
determine_setup
ref
function
rootpath, parsed_inipath, ini_config = determine_setup(None, [str(b), str(a)])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,356
parametrize
ref
function
@pytest.mark.parametrize("name", ["setup.cfg", "tox.ini"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,357
test_pytestini_overrides_empty_other
def
function
def test_pytestini_overrides_empty_other(self, tmp_path: Path, name: str) -> None: inipath = tmp_path / "pytest.ini" inipath.touch() a = tmp_path / "a" a.mkdir() (a / name).touch() rootpath, parsed_inipath, _ = determine_setup(None, [str(a)]) assert rootpath =...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,363
determine_setup
ref
function
rootpath, parsed_inipath, _ = determine_setup(None, [str(a)])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,367
test_setuppy_fallback
def
function
def test_setuppy_fallback(self, tmp_path: Path) -> None: a = tmp_path / "a" a.mkdir() (a / "setup.cfg").touch() (tmp_path / "setup.py").touch() rootpath, inipath, inicfg = determine_setup(None, [str(a)]) assert rootpath == tmp_path assert inipath is None ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,372
determine_setup
ref
function
rootpath, inipath, inicfg = determine_setup(None, [str(a)])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,377
test_nothing
def
function
def test_nothing(self, tmp_path: Path, monkeypatch: MonkeyPatch) -> None: monkeypatch.chdir(tmp_path) rootpath, inipath, inicfg = determine_setup(None, [str(tmp_path)]) assert rootpath == tmp_path assert inipath is None assert inicfg == {} @pytest.mark.parametrize( ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,379
determine_setup
ref
function
rootpath, inipath, inicfg = determine_setup(None, [str(tmp_path)])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,384
parametrize
ref
function
@pytest.mark.parametrize(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,388
param
ref
function
pytest.param(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,395
test_with_specific_inifile
def
function
def test_with_specific_inifile( self, tmp_path: Path, name: str, contents: str ) -> None: p = tmp_path / name p.touch() p.write_text(contents, "utf-8") rootpath, inipath, ini_config = determine_setup(str(p), [str(tmp_path)]) assert rootpath == tmp_path ass...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,401
determine_setup
ref
function
rootpath, inipath, ini_config = determine_setup(str(p), [str(tmp_path)])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,406
test_explicit_config_file_sets_rootdir
def
function
def test_explicit_config_file_sets_rootdir( self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch ) -> None: tests_dir = tmp_path / "tests" tests_dir.mkdir() monkeypatch.chdir(tmp_path) # No config file is explicitly given: rootdir is determined to be cwd. rootp...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,415
determine_setup
ref
function
rootpath, found_inipath, *_ = determine_setup(None, [str(tests_dir)])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,422
determine_setup
ref
function
rootpath, found_inipath, *_ = determine_setup(str(inipath), [str(tests_dir)])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,426
test_with_arg_outside_cwd_without_inifile
def
function
def test_with_arg_outside_cwd_without_inifile( self, tmp_path: Path, monkeypatch: MonkeyPatch ) -> None: monkeypatch.chdir(tmp_path) a = tmp_path / "a" a.mkdir() b = tmp_path / "b" b.mkdir() rootpath, inifile, _ = determine_setup(None, [str(a), str(b)]) ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,434
determine_setup
ref
function
rootpath, inifile, _ = determine_setup(None, [str(a), str(b)])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,438
test_with_arg_outside_cwd_with_inifile
def
function
def test_with_arg_outside_cwd_with_inifile(self, tmp_path: Path) -> None: a = tmp_path / "a" a.mkdir() b = tmp_path / "b" b.mkdir() inipath = a / "pytest.ini" inipath.touch() rootpath, parsed_inipath, _ = determine_setup(None, [str(a), str(b)]) assert ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,445
determine_setup
ref
function
rootpath, parsed_inipath, _ = determine_setup(None, [str(a), str(b)])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,449
parametrize
ref
function
@pytest.mark.parametrize("dirs", ([], ["does-not-exist"], ["a/does-not-exist"]))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,450
test_with_non_dir_arg
def
function
def test_with_non_dir_arg( self, dirs: Sequence[str], tmp_path: Path, monkeypatch: MonkeyPatch ) -> None: monkeypatch.chdir(tmp_path) rootpath, inipath, _ = determine_setup(None, dirs) assert rootpath == tmp_path assert inipath is None def test_with_existing_file_in_...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,454
determine_setup
ref
function
rootpath, inipath, _ = determine_setup(None, dirs)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,458
test_with_existing_file_in_subdir
def
function
def test_with_existing_file_in_subdir( self, tmp_path: Path, monkeypatch: MonkeyPatch ) -> None: a = tmp_path / "a" a.mkdir() (a / "exists").touch() monkeypatch.chdir(tmp_path) rootpath, inipath, _ = determine_setup(None, ["a/exist"]) assert rootpath == tm...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,465
determine_setup
ref
function
rootpath, inipath, _ = determine_setup(None, ["a/exist"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,469
test_with_config_also_in_parent_directory
def
function
def test_with_config_also_in_parent_directory( self, tmp_path: Path, monkeypatch: MonkeyPatch ) -> None: """Regression test for #7807.""" (tmp_path / "setup.cfg").write_text("[tool:pytest]\n", "utf-8") (tmp_path / "myproject").mkdir() (tmp_path / "myproject" / "setup.cfg"...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,479
determine_setup
ref
function
rootpath, inipath, _ = determine_setup(None, ["tests/"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,485
TestOverrideIniArgs
def
class
test_override_ini_names test_override_ini_paths test_override_multiple_and_default test_override_ini_usage_error_bad_style test_override_ini_handled_asap test_addopts_before_initini test_addopts_from_env_not_concatenated test_addopts_from_ini_not_concatenated test_override_ini_does_not_contain_paths test_multiple_overr...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,486
parametrize
ref
function
@pytest.mark.parametrize("name", "setup.cfg tox.ini pytest.ini".split())
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,487
test_override_ini_names
def
function
def test_override_ini_names(self, pytester: Pytester, name: str) -> None: section = "[pytest]" if name != "setup.cfg" else "[tool:pytest]" pytester.path.joinpath(name).write_text( textwrap.dedent( """ {section} custom = 1.0""".format( ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,498
makeconftest
ref
function
pytester.makeconftest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,503
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,510
runpytest
ref
function
result = pytester.runpytest("--override-ini", "custom=2.0", "-s")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,512
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["custom_option:2.0"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,514
runpytest
ref
function
result = pytester.runpytest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,518
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["custom_option:3.0"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,520
test_override_ini_paths
def
function
def test_override_ini_paths(self, pytester: Pytester) -> None: pytester.makeconftest( """ def pytest_addoption(parser): parser.addini("paths", "my new ini value", type="paths")""" ) pytester.makeini( """ [pytest] pat...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,521
makeconftest
ref
function
pytester.makeconftest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,526
makeini
ref
function
pytester.makeini(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,531
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,540
runpytest
ref
function
result = pytester.runpytest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,543
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["user_path:bar1.py", "user_path:bar2.py"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,545
test_override_multiple_and_default
def
function
def test_override_multiple_and_default(self, pytester: Pytester) -> None: pytester.makeconftest( """ def pytest_addoption(parser): addini = parser.addini addini("custom_option_1", "", default="o1") addini("custom_option_2", "", default=...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,546
makeconftest
ref
function
pytester.makeconftest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,555
makeini
ref
function
pytester.makeini(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,562
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,571
runpytest
ref
function
result = pytester.runpytest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,582
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,591
test_override_ini_usage_error_bad_style
def
function
def test_override_ini_usage_error_bad_style(self, pytester: Pytester) -> None: pytester.makeini( """ [pytest] xdist_strict=_False """ ) result = pytester.runpytest("--override-ini", "xdist_strict", "_True") result.stderr.fnmatch_lines( ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,592
makeini
ref
function
pytester.makeini(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,598
runpytest
ref
function
result = pytester.runpytest("--override-ini", "xdist_strict", "True")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,599
fnmatch_lines
ref
function
result.stderr.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,605
parametrize
ref
function
@pytest.mark.parametrize("with_ini", [True, False])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,606
test_override_ini_handled_asap
def
function
def test_override_ini_handled_asap( self, pytester: Pytester, with_ini: bool ) -> None: """-o should be handled as soon as possible and always override what's in ini files (#2238)""" if with_ini: pytester.makeini( """ [pytest] p...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,611
makeini
ref
function
pytester.makeini(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,617
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,623
runpytest
ref
function
result = pytester.runpytest("--override-ini", "python_files=unittest_*.py")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,624
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*1 passed in*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,626
test_addopts_before_initini
def
function
def test_addopts_before_initini( self, monkeypatch: MonkeyPatch, _config_for_test, _sys_snapshot ) -> None: cache_dir = ".custom_cache" monkeypatch.setenv("PYTEST_ADDOPTS", "-o cache_dir=%s" % cache_dir) config = _config_for_test config._preparse([], addopts=_True) ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,630
setenv
ref
function
monkeypatch.setenv("PYTEST_ADDOPTS", "-o cache_dir=%s" % cache_dir)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,632
_preparse
ref
function
config._preparse([], addopts=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,635
test_addopts_from_env_not_concatenated
def
function
def test_addopts_from_env_not_concatenated( self, monkeypatch: MonkeyPatch, _config_for_test ) -> None: """PYTEST_ADDOPTS should not take values from normal args (#4265).""" monkeypatch.setenv("PYTEST_ADDOPTS", "-o") config = _config_for_test with pytest.raises(UsageError...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,639
setenv
ref
function
monkeypatch.setenv("PYTEST_ADDOPTS", "-o")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,641
raises
ref
function
with pytest.raises(UsageError) as excinfo:
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,642
_preparse
ref
function
config._preparse(["cache_dir=ignored"], addopts=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,648
test_addopts_from_ini_not_concatenated
def
function
def test_addopts_from_ini_not_concatenated(self, pytester: Pytester) -> None: """`addopts` from ini should not take values from normal args (#4265).""" pytester.makeini( """ [pytest] addopts=-o """ ) result = pytester.runpytest("cache_dir=i...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,650
makeini
ref
function
pytester.makeini(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,656
runpytest
ref
function
result = pytester.runpytest("cache_dir=ignored")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,657
fnmatch_lines
ref
function
result.stderr.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,665
test_override_ini_does_not_contain_paths
def
function
def test_override_ini_does_not_contain_paths( self, _config_for_test, _sys_snapshot ) -> None: """Check that -o no longer swallows all options after it (#3103)""" config = _config_for_test config._preparse(["-o", "cache_dir=/cache", "/some/test/path"]) assert config._over...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,670
_preparse
ref
function
config._preparse(["-o", "cache_dir=/cache", "/some/test/path"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,673
test_multiple_override_ini_options
def
function
def test_multiple_override_ini_options(self, pytester: Pytester) -> None: """Ensure a file path following a '-o' option does not generate an error (#3103)""" pytester.makepyfile( **{ "conftest.py": """ def pytest_addoption(parser): pars...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_config.py
testing/test_config.py
1,675
makepyfile
ref
function
pytester.makepyfile(