Skip to content

Commit

Permalink
test: excluding NotImplementedError excluded too much
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nedbat committed Aug 10, 2023
1 parent e51b1f7 commit d87f64a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions metacov.ini
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ exclude_lines =
pragma: nested
cov.stop\(\)

# Abstract methods
raise NotImplementedError

# Lines that are only executed when we are debugging coverage.py.
def __repr__
pragma: debugging
Expand Down
2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ class IncludeOmitTestsMixin(UsingModulesMixin, CoverageTest):
# An abstract method for subclasses to define, to appease mypy.
def coverage_usepkgs(self, **kwargs_unused: TCovKwargs) -> Iterable[str]:
"""Run coverage on usepkgs, return a line summary. kwargs are for Coverage(**kwargs)."""
raise NotImplementedError()
raise NotImplementedError() # pragma: not covered

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

0 comments on commit d87f64a

Please sign in to comment.