Revert `main.py` and `test_config.py` files
- `main.py` to commit SHA `310b67b` - `test_config.py` to commit SHA `407b330`
This commit is contained in:
parent
77cdb8b121
commit
8450d888cf
|
@ -122,12 +122,11 @@ def pytest_addoption(parser: Parser) -> None:
|
||||||
)
|
)
|
||||||
group._addoption(
|
group._addoption(
|
||||||
"-c",
|
"-c",
|
||||||
"--config-file",
|
metavar="file",
|
||||||
metavar="FILE",
|
|
||||||
type=str,
|
type=str,
|
||||||
dest="inifilename",
|
dest="inifilename",
|
||||||
help="Load configuration from `FILE` instead of trying to locate one of the "
|
help="Load configuration from `file` instead of trying to locate one of the "
|
||||||
"implicit configuration files.",
|
"implicit configuration files",
|
||||||
)
|
)
|
||||||
group._addoption(
|
group._addoption(
|
||||||
"--continue-on-collection-errors",
|
"--continue-on-collection-errors",
|
||||||
|
|
|
@ -514,8 +514,6 @@ class TestConfigCmdlineParsing:
|
||||||
)
|
)
|
||||||
config = pytester.parseconfig("-c", "custom.ini")
|
config = pytester.parseconfig("-c", "custom.ini")
|
||||||
assert config.getini("custom") == "1"
|
assert config.getini("custom") == "1"
|
||||||
config = pytester.parseconfig("--config-file", "custom.ini")
|
|
||||||
assert config.getini("custom") == "1"
|
|
||||||
|
|
||||||
pytester.makefile(
|
pytester.makefile(
|
||||||
".cfg",
|
".cfg",
|
||||||
|
@ -526,8 +524,6 @@ class TestConfigCmdlineParsing:
|
||||||
)
|
)
|
||||||
config = pytester.parseconfig("-c", "custom_tool_pytest_section.cfg")
|
config = pytester.parseconfig("-c", "custom_tool_pytest_section.cfg")
|
||||||
assert config.getini("custom") == "1"
|
assert config.getini("custom") == "1"
|
||||||
config = pytester.parseconfig("--config-file", "custom_tool_pytest_section.cfg")
|
|
||||||
assert config.getini("custom") == "1"
|
|
||||||
|
|
||||||
pytester.makefile(
|
pytester.makefile(
|
||||||
".toml",
|
".toml",
|
||||||
|
@ -540,8 +536,6 @@ class TestConfigCmdlineParsing:
|
||||||
)
|
)
|
||||||
config = pytester.parseconfig("-c", "custom.toml")
|
config = pytester.parseconfig("-c", "custom.toml")
|
||||||
assert config.getini("custom") == "1"
|
assert config.getini("custom") == "1"
|
||||||
config = pytester.parseconfig("--config-file", "custom.toml")
|
|
||||||
assert config.getini("custom") == "1"
|
|
||||||
|
|
||||||
def test_absolute_win32_path(self, pytester: Pytester) -> None:
|
def test_absolute_win32_path(self, pytester: Pytester) -> None:
|
||||||
temp_ini_file = pytester.makefile(
|
temp_ini_file = pytester.makefile(
|
||||||
|
@ -556,8 +550,6 @@ class TestConfigCmdlineParsing:
|
||||||
temp_ini_file_norm = normpath(str(temp_ini_file))
|
temp_ini_file_norm = normpath(str(temp_ini_file))
|
||||||
ret = pytest.main(["-c", temp_ini_file_norm])
|
ret = pytest.main(["-c", temp_ini_file_norm])
|
||||||
assert ret == ExitCode.OK
|
assert ret == ExitCode.OK
|
||||||
ret = pytest.main(["--config-file", temp_ini_file_norm])
|
|
||||||
assert ret == ExitCode.OK
|
|
||||||
|
|
||||||
|
|
||||||
class TestConfigAPI:
|
class TestConfigAPI:
|
||||||
|
@ -1915,9 +1907,6 @@ class TestSetupCfg:
|
||||||
with pytest.raises(pytest.fail.Exception):
|
with pytest.raises(pytest.fail.Exception):
|
||||||
pytester.runpytest("-c", "custom.cfg")
|
pytester.runpytest("-c", "custom.cfg")
|
||||||
|
|
||||||
with pytest.raises(pytest.fail.Exception):
|
|
||||||
pytester.runpytest("--config-file", "custom.cfg")
|
|
||||||
|
|
||||||
|
|
||||||
class TestPytestPluginsVariable:
|
class TestPytestPluginsVariable:
|
||||||
def test_pytest_plugins_in_non_top_level_conftest_unsupported(
|
def test_pytest_plugins_in_non_top_level_conftest_unsupported(
|
||||||
|
|
Loading…
Reference in New Issue