Skip to content

Commit 499aaa9

Browse files
committed
Add test to cover getini KeyError in mock_config
1 parent b9e20c4 commit 499aaa9

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

testing/test_assertion.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ def test_get_unsupported_type_error(self):
8484
with pytest.raises(KeyError):
8585
config.get_verbosity("--- NOT A VERBOSITY LEVEL ---")
8686

87+
def test_getini_unsupported_error(self):
88+
config = mock_config()
89+
90+
with pytest.raises(KeyError, match="Not mocked out: --- NOT AN INI ---"):
91+
config.getini("--- NOT AN INI ---")
92+
8793

8894
class TestImportHookInstallation:
8995
@pytest.mark.parametrize("initial_conftest", [True, False])

0 commit comments

Comments
 (0)