diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-01-31 10:10:47 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-01-31 10:10:47 -0500 |
commit | d02be78c3a0ee3022be56c623bb9bdcad1e9acd4 (patch) | |
tree | 1e74153bb4741f6a9e2f1e1f55d2b9960a490bb3 /tests/test_summary.py | |
parent | a035bde3320a501720ae722dc6b54fe7ff5c8647 (diff) | |
download | python-coveragepy-git-d02be78c3a0ee3022be56c623bb9bdcad1e9acd4.tar.gz |
style: fix long lines and avoid backslashesnedbat/unittest2pytest
Diffstat (limited to 'tests/test_summary.py')
-rw-r--r-- | tests/test_summary.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/test_summary.py b/tests/test_summary.py index 1d74af9c..e3694000 100644 --- a/tests/test_summary.py +++ b/tests/test_summary.py @@ -562,8 +562,7 @@ class SummaryTest(UsingModulesMixin, CoverageTest): errmsg = re.sub(r"parse '.*mycode.py", "parse 'mycode.py", errmsg) # The actual error message varies version to version errmsg = re.sub(r": '.*' at", ": 'error' at", errmsg) - assert "Couldn't parse 'mycode.py' as Python source: 'error' at line 1" == \ - errmsg + assert errmsg == "Couldn't parse 'mycode.py' as Python source: 'error' at line 1" def test_accenteddotpy_not_python(self): if env.JYTHON: @@ -923,8 +922,8 @@ class TestSummaryReporterConfiguration(CoverageTest): """Assert that the `words` appear in order in `text`.""" indexes = list(map(text.find, words)) assert -1 not in indexes - assert indexes == sorted(indexes), \ - "The words %r don't appear in order in %r" % (words, text) + msg = "The words %r don't appear in order in %r" % (words, text) + assert indexes == sorted(indexes), msg def test_sort_report_by_stmts(self): # Sort the text report by the Stmts column. |