summaryrefslogtreecommitdiff
path: root/tests/test_process.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2020-06-28 17:31:09 -0400
committerNed Batchelder <ned@nedbatchelder.com>2020-06-28 17:31:09 -0400
commitb436f4459a2fbc69f7a1376693782c7bd115b2bd (patch)
treeb02875a1e96510b15e9b8ab0071d3b389fa78602 /tests/test_process.py
parent221caf0deeb5a27a851afeab1687dc6485ada517 (diff)
downloadpython-coveragepy-git-b436f4459a2fbc69f7a1376693782c7bd115b2bd.tar.gz
Provide more information in the fail-under message
Diffstat (limited to 'tests/test_process.py')
-rw-r--r--tests/test_process.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/test_process.py b/tests/test_process.py
index 0428db75..8f8b009c 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -1236,13 +1236,19 @@ class FailUnderTest(CoverageTest):
def test_report_43_is_not_ok(self):
st, out = self.run_command_status("coverage report --fail-under=44")
self.assertEqual(st, 2)
- self.assertEqual(self.last_line_squeezed(out), "fail-under has failed")
+ self.assertEqual(
+ self.last_line_squeezed(out),
+ "Coverage failure: total of 43 is less than fail-under=44"
+ )
def test_report_42p86_is_not_ok(self):
self.make_file(".coveragerc", "[report]\nprecision = 2")
st, out = self.run_command_status("coverage report --fail-under=42.88")
self.assertEqual(st, 2)
- self.assertEqual(self.last_line_squeezed(out), "fail-under has failed")
+ self.assertEqual(
+ self.last_line_squeezed(out),
+ "Coverage failure: total of 42.86 is less than fail-under=42.88"
+ )
class FailUnderNoFilesTest(CoverageTest):