summaryrefslogtreecommitdiff
path: root/tests/test_results.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-11-13 19:23:24 -0500
committerNed Batchelder <ned@nedbatchelder.com>2021-11-14 08:12:49 -0500
commitb82e9fd8766a77c2a275bde7b574f3e8cb529f8f (patch)
treef310ea38a19f2b4e8c93ee3e3a5b8a99aa43351a /tests/test_results.py
parent342e7da2941ae5291f1a94b6ad66ce489f6985fe (diff)
downloadpython-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_results.py')
-rw-r--r--tests/test_results.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_results.py b/tests/test_results.py
index 83968956..8b2a737b 100644
--- a/tests/test_results.py
+++ b/tests/test_results.py
@@ -5,7 +5,7 @@
import pytest
-from coverage.exceptions import CoverageException
+from coverage.exceptions import ConfigError
from coverage.results import format_lines, Numbers, should_fail_under
from tests.coveragetest import CoverageTest
@@ -114,7 +114,7 @@ def test_should_fail_under(total, fail_under, precision, result):
def test_should_fail_under_invalid_value():
- with pytest.raises(CoverageException, match=r"fail_under=101"):
+ with pytest.raises(ConfigError, match=r"fail_under=101"):
should_fail_under(100.0, 101, 0)