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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
177
inline_run
ref
function
result = pytester.inline_run("--confcutdir=.")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
180
parametrize
ref
function
@pytest.mark.parametrize(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
183
param
ref
function
pytest.param(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
198
param
ref
function
pytest.param(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
212
param
ref
function
pytest.param(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
224
param
ref
function
pytest.param(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
234
param
ref
function
pytest.param(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
247
test_invalid_config_options
def
function
def test_invalid_config_options( self, pytester: Pytester, ini_file_text, invalid_keys, warning_output, exception_text, ) -> None: pytester.makeconftest( """ def pytest_addoption(parser): parser.addini("conftest_ini_...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
255
makeconftest
ref
function
pytester.makeconftest(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
261
makepyfile
ref
function
pytester.makepyfile("def test(): pass")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
262
makeini
ref
function
pytester.makeini(ini_file_text)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
264
parseconfig
ref
function
config = pytester.parseconfig()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
265
_get_unknown_ini_keys
ref
function
assert sorted(config._get_unknown_ini_keys()) == sorted(invalid_keys)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
267
runpytest
ref
function
result = pytester.runpytest()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
268
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(warning_output)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
270
runpytest
ref
function
result = pytester.runpytest("--strict-config")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
272
fnmatch_lines
ref
function
result.stderr.fnmatch_lines("ERROR: " + exception_text)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
275
no_fnmatch_line
ref
function
result.stderr.no_fnmatch_line(exception_text)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
279
test_silence_unknown_key_warning
def
function
def test_silence_unknown_key_warning(self, pytester: Pytester) -> None: """Unknown config key warnings can be silenced using filterwarnings (#7620)""" pytester.makeini( """ [pytest] filterwarnings = ignore:Unknown config option:pytest.PytestConfigW...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
281
makeini
ref
function
pytester.makeini(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
289
runpytest
ref
function
result = pytester.runpytest()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
290
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*PytestConfigWarning*")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
293
test_disable_warnings_plugin_disables_config_warnings
def
function
def test_disable_warnings_plugin_disables_config_warnings( self, pytester: Pytester ) -> None: """Disabling 'warnings' plugin also disables config time warnings""" pytester.makeconftest( """ import pytest def pytest_configure(config): c...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
297
makeconftest
ref
function
pytester.makeconftest(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
307
runpytest
ref
function
result = pytester.runpytest("-pno:warnings")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
308
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*PytestConfigWarning*")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
310
parametrize
ref
function
@pytest.mark.parametrize(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
313
param
ref
function
pytest.param(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
322
param
ref
function
pytest.param(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
331
param
ref
function
pytest.param(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
340
param
ref
function
pytest.param(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
349
param
ref
function
pytest.param(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
358
param
ref
function
pytest.param(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
367
param
ref
function
pytest.param(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
376
param
ref
function
pytest.param(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
385
param
ref
function
pytest.param(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
397
test_missing_required_plugins
def
function
def test_missing_required_plugins( self, pytester: Pytester, monkeypatch: MonkeyPatch, ini_file_text: str, plugin_version: str, exception_text: str, ) -> None: """Check 'required_plugins' option with various settings. This test installs a mock "my...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
411
DummyEntryPoint
def
class
load load load load load
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
416
load
def
function
def load(self): __import__(self.module) return sys.modules[self.module] entry_points = [ DummyEntryPoint("myplugin1", "myplugin1_module"), ] @attr.s class DummyDist: entry_points = attr.ib() files = () ...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
421
DummyEntryPoint
ref
function
DummyEntryPoint("myplugin1", "myplugin1_module"),
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
425
DummyDist
def
class
metadata
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
431
metadata
def
function
def metadata(self): return {"name": "myplugin"} def my_dists(): return [DummyDist(entry_points)] pytester.makepyfile(myplugin1_module="# my plugin module") pytester.syspathinsert() monkeypatch.setattr(importlib_metadata, "distributions", my_dist...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
434
my_dists
def
function
def my_dists(): return [DummyDist(entry_points)] pytester.makepyfile(myplugin1_module="# my plugin module") pytester.syspathinsert() monkeypatch.setattr(importlib_metadata, "distributions", my_dists) monkeypatch.delenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD", raising=_Fals...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
435
DummyDist
ref
function
return [DummyDist(entry_points)]
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
437
makepyfile
ref
function
pytester.makepyfile(myplugin1_module="# my plugin module")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
438
syspathinsert
ref
function
pytester.syspathinsert()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
441
delenv
ref
function
monkeypatch.delenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD", raising=False)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
443
makeini
ref
function
pytester.makeini(ini_file_text)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
446
raises
ref
function
with pytest.raises(pytest.UsageError, match=exception_text):
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
447
parseconfig
ref
function
pytester.parseconfig()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
449
parseconfig
ref
function
pytester.parseconfig()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
451
test_early_config_cmdline
def
function
def test_early_config_cmdline( self, pytester: Pytester, monkeypatch: MonkeyPatch ) -> None: """early_config contains options registered by third-party plugins. This is a regression involving pytest-cov (and possibly others) introduced in #7700. """ pytester.makepyfile( ...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
458
makepyfile
ref
function
pytester.makepyfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
467
setenv
ref
function
monkeypatch.setenv("PYTEST_PLUGINS", "myplugin")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
468
syspathinsert
ref
function
pytester.syspathinsert()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
469
runpytest
ref
function
result = pytester.runpytest("--foo=1")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
470
fnmatch_lines
ref
function
result.stdout.fnmatch_lines("* no tests ran in *")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
473
TestConfigCmdlineParsing
def
class
test_parsing_again_fails test_explicitly_specified_config_file_is_loaded test_absolute_win32_path
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
474
test_parsing_again_fails
def
function
def test_parsing_again_fails(self, pytester: Pytester) -> None: config = pytester.parseconfig() pytest.raises(AssertionError, lambda: config.parse([])) def test_explicitly_specified_config_file_is_loaded( self, pytester: Pytester ) -> None: pytester.makeconftest( ...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
475
parseconfig
ref
function
config = pytester.parseconfig()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
476
raises
ref
function
pytest.raises(AssertionError, lambda: config.parse([]))
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
476
parse
ref
function
pytest.raises(AssertionError, lambda: config.parse([]))
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
478
test_explicitly_specified_config_file_is_loaded
def
function
def test_explicitly_specified_config_file_is_loaded( self, pytester: Pytester ) -> None: pytester.makeconftest( """ def pytest_addoption(parser): parser.addini("custom", "") """ ) pytester.makeini( """ [pytes...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
481
makeconftest
ref
function
pytester.makeconftest(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
487
makeini
ref
function
pytester.makeini(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
493
makefile
ref
function
pytester.makefile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
500
parseconfig
ref
function
config = pytester.parseconfig("-c", "custom.ini")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
501
getini
ref
function
assert config.getini("custom") == "1"
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
503
makefile
ref
function
pytester.makefile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
510
parseconfig
ref
function
config = pytester.parseconfig("-c", "custom_tool_pytest_section.cfg")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
511
getini
ref
function
assert config.getini("custom") == "1"
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
513
makefile
ref
function
pytester.makefile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
522
parseconfig
ref
function
config = pytester.parseconfig("-c", "custom.toml")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
523
getini
ref
function
assert config.getini("custom") == "1"
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
525
test_absolute_win32_path
def
function
def test_absolute_win32_path(self, pytester: Pytester) -> None: temp_ini_file = pytester.makefile( ".ini", custom=""" [pytest] addopts = --version """, ) from os.path import normpath temp_ini_file_norm = normpath(str(temp_ini_f...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
526
makefile
ref
function
temp_ini_file = pytester.makefile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
536
main
ref
function
ret = pytest.main(["-c", temp_ini_file_norm])
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
540
TestConfigAPI
def
class
test_config_trace test_config_getoption test_config_getoption_unicode test_config_getvalueorskip test_config_getvalueorskip_None test_getoption test_getconftest_pathlist test_addini test_addini_paths make_conftest_for_args test_addini_args_ini_files test_addini_args_pyproject_toml check_config_args make_conftest_for_li...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
541
test_config_trace
def
function
def test_config_trace(self, pytester: Pytester) -> None: config = pytester.parseconfig() values: List[str] = [] config.trace.root.setwriter(values.append) config.trace("hello") assert len(values) == 1 assert values[0] == "hello [config]\n" def test_config_getopti...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
542
parseconfig
ref
function
config = pytester.parseconfig()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
544
setwriter
ref
function
config.trace.root.setwriter(values.append)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
545
trace
ref
function
config.trace("hello")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
549
test_config_getoption
def
function
def test_config_getoption(self, pytester: Pytester) -> None: pytester.makeconftest( """ def pytest_addoption(parser): parser.addoption("--hello", "-X", dest="hello") """ ) config = pytester.parseconfig("--hello=this") for x in ("hello",...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
550
makeconftest
ref
function
pytester.makeconftest(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
556
parseconfig
ref
function
config = pytester.parseconfig("--hello=this")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
558
getoption
ref
function
assert config.getoption(x) == "this"
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
559
raises
ref
function
pytest.raises(ValueError, config.getoption, "qweqwe")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
561
test_config_getoption_unicode
def
function
def test_config_getoption_unicode(self, pytester: Pytester) -> None: pytester.makeconftest( """ def pytest_addoption(parser): parser.addoption('--hello', type=str) """ ) config = pytester.parseconfig("--hello=this") assert config.getopt...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
562
makeconftest
ref
function
pytester.makeconftest(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
568
parseconfig
ref
function
config = pytester.parseconfig("--hello=this")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
569
getoption
ref
function
assert config.getoption("hello") == "this"
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
571
test_config_getvalueorskip
def
function
def test_config_getvalueorskip(self, pytester: Pytester) -> None: config = pytester.parseconfig() pytest.raises(pytest.skip.Exception, config.getvalueorskip, "hello") verbose = config.getvalueorskip("verbose") assert verbose == config.option.verbose def test_config_getvalueorski...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
572
parseconfig
ref
function
config = pytester.parseconfig()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
573
raises
ref
function
pytest.raises(pytest.skip.Exception, config.getvalueorskip, "hello")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
574
getvalueorskip
ref
function
verbose = config.getvalueorskip("verbose")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
577
test_config_getvalueorskip_None
def
function
def test_config_getvalueorskip_None(self, pytester: Pytester) -> None: pytester.makeconftest( """ def pytest_addoption(parser): parser.addoption("--hello") """ ) config = pytester.parseconfig() with pytest.raises(pytest.skip.Exception):...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
578
makeconftest
ref
function
pytester.makeconftest(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
584
parseconfig
ref
function
config = pytester.parseconfig()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
585
raises
ref
function
with pytest.raises(pytest.skip.Exception):
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_config.py
testing/test_config.py
586
getvalueorskip
ref
function
config.getvalueorskip("hello")