diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-11-13 19:23:24 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-11-14 11:41:23 -0500 |
commit | 1c29ef3e4b871508bb2defd6b47b9a745547b626 (patch) | |
tree | 931fd2d7175321fd1549fd32e378cddcc99d2537 /tests/test_summary.py | |
parent | 342e7da2941ae5291f1a94b6ad66ce489f6985fe (diff) | |
download | python-coveragepy-git-1c29ef3e4b871508bb2defd6b47b9a745547b626.tar.gz |
refactor: specialize 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_summary.py')
-rw-r--r-- | tests/test_summary.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_summary.py b/tests/test_summary.py index 6fbb034d..769c6ec7 100644 --- a/tests/test_summary.py +++ b/tests/test_summary.py @@ -16,7 +16,7 @@ import coverage from coverage import env from coverage.control import Coverage from coverage.data import CoverageData -from coverage.exceptions import CoverageException +from coverage.exceptions import ConfigError from coverage.summary import SummaryReporter from tests.coveragetest import CoverageTest, TESTS_DIR, UsingModulesMixin @@ -921,5 +921,5 @@ class SummaryReporterConfigurationTest(CoverageTest): def test_sort_report_by_invalid_option(self): # Sort the text report by a nonsense column. msg = "Invalid sorting option: 'Xyzzy'" - with pytest.raises(CoverageException, match=msg): + with pytest.raises(ConfigError, match=msg): self.get_summary_text(('report:sort', 'Xyzzy')) |