Skip to content

Commit d87f64a

Browse files
committed
test: excluding NotImplementedError excluded too much
There are tests that mention NotImplementedError that were accidentally excluded by this new metacov rule. Instead, we'll manually pragma the lines we want to exclude.
1 parent e51b1f7 commit d87f64a

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

metacov.ini

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ exclude_lines =
4444
pragma: nested
4545
cov.stop\(\)
4646

47-
# Abstract methods
48-
raise NotImplementedError
49-
5047
# Lines that are only executed when we are debugging coverage.py.
5148
def __repr__
5249
pragma: debugging

tests/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ class IncludeOmitTestsMixin(UsingModulesMixin, CoverageTest):
820820
# An abstract method for subclasses to define, to appease mypy.
821821
def coverage_usepkgs(self, **kwargs_unused: TCovKwargs) -> Iterable[str]:
822822
"""Run coverage on usepkgs, return a line summary. kwargs are for Coverage(**kwargs)."""
823-
raise NotImplementedError()
823+
raise NotImplementedError() # pragma: not covered
824824

825825
def filenames_in(self, summary: Iterable[str], filenames: str) -> None:
826826
"""Assert the `filenames` are in the `summary`."""

0 commit comments

Comments
 (0)