Test case for unknown verbosity type
This commit is contained in:
parent
b47b203eef
commit
91bfcab9dd
|
@ -2279,6 +2279,24 @@ class TestVerbosity:
|
||||||
== config.option.verbose
|
== config.option.verbose
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def test_level_matches_verbose_when_not_known_type(
|
||||||
|
self, pytester: Pytester, tmp_path: Path
|
||||||
|
) -> None:
|
||||||
|
tmp_path.joinpath("pytest.ini").write_text(
|
||||||
|
textwrap.dedent(
|
||||||
|
"""\
|
||||||
|
[pytest]
|
||||||
|
addopts = --verbose
|
||||||
|
"""
|
||||||
|
),
|
||||||
|
encoding="utf-8",
|
||||||
|
)
|
||||||
|
pytester.plugins = [TestVerbosity.VerbosityIni()]
|
||||||
|
|
||||||
|
config = pytester.parseconfig(tmp_path)
|
||||||
|
|
||||||
|
assert config.get_verbosity("some fake verbosity type") == config.option.verbose
|
||||||
|
|
||||||
def test_level_matches_specified_override(
|
def test_level_matches_specified_override(
|
||||||
self, pytester: Pytester, tmp_path: Path
|
self, pytester: Pytester, tmp_path: Path
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
Loading…
Reference in New Issue