Test case for unknown verbosity type

This commit is contained in:
Patrick Lannigan 2023-11-12 20:08:12 -05:00
parent b47b203eef
commit 91bfcab9dd
No known key found for this signature in database
GPG Key ID: BBF5D9DED1E4AAF9
1 changed files with 18 additions and 0 deletions

View File

@ -2279,6 +2279,24 @@ class TestVerbosity:
== 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(
self, pytester: Pytester, tmp_path: Path
) -> None: