MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_append_parse_args

Method test_append_parse_args

testing/test_config.py:81–97  ·  view source on GitHub ↗
(
        self, pytester: Pytester, tmp_path: Path, monkeypatch: MonkeyPatch
    )

Source from the content-addressed store, hash-verified

79 assert result.ret == 0
80
81 def test_append_parse_args(
82 self, pytester: Pytester, tmp_path: Path, monkeypatch: MonkeyPatch
83 ) -> None:
84 monkeypatch.setenv("PYTEST_ADDOPTS", '--color no -rs --tb="short"')
85 tmp_path.joinpath("pytest.ini").write_text(
86 textwrap.dedent(
87 """\
88 [pytest]
89 addopts = --verbose
90 """
91 )
92 )
93 config = pytester.parseconfig(tmp_path)
94 assert config.option.color == "no"
95 assert config.option.reportchars == "s"
96 assert config.option.tbstyle == "short"
97 assert config.option.verbose
98
99 def test_tox_ini_wrong_version(self, pytester: Pytester) -> None:
100 pytester.makefile(

Callers

nothing calls this directly

Calls 2

setenvMethod · 0.80
parseconfigMethod · 0.45

Tested by

no test coverage detected