summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_plugins.py2
-rw-r--r--tests/test_summary.py33
2 files changed, 12 insertions, 23 deletions
diff --git a/tests/test_plugins.py b/tests/test_plugins.py
index 54f26a7f..2129076a 100644
--- a/tests/test_plugins.py
+++ b/tests/test_plugins.py
@@ -416,7 +416,7 @@ class GoodPluginTest(FileTracerTest):
'bar_4.html 4 2 0 0 50% 1, 4',
'foo_7.html 7 5 0 0 29% 1-3, 6-7',
'--------------------------------------------------------',
- 'TOTAL 11 7 0 0 36% ',
+ 'TOTAL 11 7 0 0 36%',
]
self.assertEqual(report, expected)
self.assertAlmostEqual(total, 36.36, places=2)
diff --git a/tests/test_summary.py b/tests/test_summary.py
index 9d7a6fe7..0cb9c24b 100644
--- a/tests/test_summary.py
+++ b/tests/test_summary.py
@@ -218,28 +218,17 @@ class SummaryTest(CoverageTest):
out = self.run_command("coverage run --branch main.py")
self.assertEqual(out, 'x\ny\n')
report = self.report_from_command("coverage report --show-missing")
-
- # Name Stmts Miss Branch BrPart Cover Missing
- # -------------------------------------------------------
- # main.py 1 0 0 0 100%
- # mybranch.py 10 2 8 3 61% 7-8, 2->4, 4->6, 6->7
- # -------------------------------------------------------
- # TOTAL 11 2 8 3 63%
-
- self.assertEqual(self.line_count(report), 6)
- squeezed = self.squeezed_lines(report)
- self.assertEqual(
- squeezed[2],
- "main.py 1 0 0 0 100%"
- )
- self.assertEqual(
- squeezed[3],
- "mybranch.py 10 2 8 3 61% 7-8, 2->4, 4->6, 6->7"
- )
- self.assertEqual(
- squeezed[5],
- "TOTAL 11 2 8 3 63%"
- )
+ report_lines = report.splitlines()
+
+ expected = [
+ 'Name Stmts Miss Branch BrPart Cover Missing',
+ '---------------------------------------------------------',
+ 'main.py 1 0 0 0 100%',
+ 'mybranch.py 10 2 8 3 61% 7-8, 2->4, 4->6, 6->7',
+ '---------------------------------------------------------',
+ 'TOTAL 11 2 8 3 63%',
+ ]
+ self.assertEqual(report_lines, expected)
def test_report_skip_covered_no_branches(self):
self.make_file("main.py", """