MCPcopy
hub / github.com/pytest-dev/pytest / test_report_chars_option

Method test_report_chars_option

testing/test_config.py:104–115  ·  view source on GitHub ↗

Test that -r/--report-chars is parsed correctly.

(
        self,
        pytester: Pytester,
        tmp_path: Path,
        monkeypatch: MonkeyPatch,
        flag: str,
        value: str,
    )

Source from the content-addressed store, hash-verified

102 @pytest.mark.parametrize("flag", ("-r", "--report-chars="))
103 @pytest.mark.parametrize("value", ("fE", "A", "fs"))
104 def test_report_chars_option(
105 self,
106 pytester: Pytester,
107 tmp_path: Path,
108 monkeypatch: MonkeyPatch,
109 flag: str,
110 value: str,
111 ) -> None:
112 """Test that -r/--report-chars is parsed correctly."""
113 monkeypatch.setenv("PYTEST_ADDOPTS", flag + value)
114 config = pytester.parseconfig(tmp_path)
115 assert config.option.reportchars == value
116
117 def test_tox_ini_wrong_version(self, pytester: Pytester) -> None:
118 pytester.makefile(

Callers

nothing calls this directly

Calls 2

setenvMethod · 0.80
parseconfigMethod · 0.45

Tested by

no test coverage detected