diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-11-13 19:23:24 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-11-14 08:12:49 -0500 |
commit | b82e9fd8766a77c2a275bde7b574f3e8cb529f8f (patch) | |
tree | f310ea38a19f2b4e8c93ee3e3a5b8a99aa43351a /tests/test_files.py | |
parent | 342e7da2941ae5291f1a94b6ad66ce489f6985fe (diff) | |
download | python-coveragepy-git-nedbat/exceptions.tar.gz |
refactor: specialize exceptionsnedbat/exceptions
CoverageException is fine as a base class, but not good to use for
raising (and catching sometimes). Introduce specialized exceptions that
allow third-party tools to integrate better.
Diffstat (limited to 'tests/test_files.py')
-rw-r--r-- | tests/test_files.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_files.py b/tests/test_files.py index de0dbbd5..0780fdb3 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -10,7 +10,7 @@ import pytest from coverage import env from coverage import files -from coverage.exceptions import CoverageException +from coverage.exceptions import ConfigError from coverage.files import ( TreeMatcher, FnmatchMatcher, ModuleMatcher, PathAliases, find_python_files, abs_file, actual_path, flat_rootname, fnmatches_to_regex, @@ -291,7 +291,7 @@ class PathAliasesTest(CoverageTest): def test_cant_have_wildcard_at_end(self, badpat): aliases = PathAliases() msg = "Pattern must not end with wildcards." - with pytest.raises(CoverageException, match=msg): + with pytest.raises(ConfigError, match=msg): aliases.add(badpat, "fooey") def test_no_accidental_munging(self): |