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
commit9b484ffa3f480889f6478d34d84987beddc08ba6 (patch)
tree94c89f650e3f2550aec42306adb9e685388f74a3 /tests/test_summary.py
parent360c7725d4a82e5ad7b9ebc2e9aa459b39f5c2b4 (diff)
downloadpython-coveragepy-git-9b484ffa3f480889f6478d34d84987beddc08ba6.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 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", """