diff --git a/metacov.ini b/metacov.ini index 78b80f6da..8e00747ba 100644 --- a/metacov.ini +++ b/metacov.ini @@ -73,6 +73,9 @@ exclude_lines = # longer tested. pragma: obscure + # Lines that will never be called, but satisfy the type checker + pragma: never called + partial_branches = pragma: part covered # A for-loop that always hits its break statement diff --git a/tests/test_plugins.py b/tests/test_plugins.py index 9f0b0cc3f..b3c8cd6f6 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -33,7 +33,7 @@ class NullConfig(TPluginConfig): """A plugin configure thing when we don't really need one.""" def get_plugin_options(self, plugin: str) -> TConfigSectionOut: - return {} + return {} # pragma: never called class FakeConfig(TPluginConfig): @@ -284,7 +284,8 @@ def test_exception_if_plugins_on_pytracer(self) -> None: if testenv.PY_TRACER: core = "PyTracer" - elif testenv.SYS_MON: + else: + assert testenv.SYS_MON core = "SysMonitor" expected_warnings = [