summaryrefslogtreecommitdiff
path: root/tests/test_summary.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-01-17 12:51:09 -0500
committerNed Batchelder <ned@nedbatchelder.com>2016-01-17 12:51:09 -0500
commite27ab798b8efb4067ed0bafd75627ae724dcfad5 (patch)
tree5b998b186fc3e45d096173d9d1f085998639cc6b /tests/test_summary.py
parent0f2e9632cf9fbb96719cf61cfc525d8abaef539f (diff)
downloadpython-coveragepy-e27ab798b8efb4067ed0bafd75627ae724dcfad5.tar.gz
Plain-text output no longer includes trailing spaces
Diffstat (limited to 'tests/test_summary.py')
-rw-r--r--tests/test_summary.py33
1 files changed, 11 insertions, 22 deletions
diff --git a/tests/test_summary.py b/tests/test_summary.py
index 9d7a6fe..0cb9c24 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", """