summaryrefslogtreecommitdiff
path: root/tests/test_process.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2017-03-08 06:43:57 -0500
committerNed Batchelder <ned@nedbatchelder.com>2017-03-08 06:43:57 -0500
commitc898faec0039f0761ac0c29bd8b4d3c0eb3f7575 (patch)
tree67f3f3d39b722080b8d3b367a133083c9f9c4023 /tests/test_process.py
parent2a672919cb758f04fd1857f313a3be5733c86298 (diff)
downloadpython-coveragepy-git-c898faec0039f0761ac0c29bd8b4d3c0eb3f7575.tar.gz
Give should_fail_under pure tests, so we don't need processes to test numeric comparisons
--HG-- extra : amend_source : 36d1fcdd986d1c2b4cd2af0d96d269e84fa40c2d
Diffstat (limited to 'tests/test_process.py')
-rw-r--r--tests/test_process.py38
1 files changed, 0 insertions, 38 deletions
diff --git a/tests/test_process.py b/tests/test_process.py
index da74d063..3c0eed04 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -1051,44 +1051,6 @@ class FailUnderEmptyFilesTest(CoverageTest):
self.assertEqual(st, 2)
-class FailUnder100Test(CoverageTest):
- """Tests of the --fail-under switch."""
-
- def test_99_8(self):
- self.make_file("ninety_nine_eight.py",
- "".join("v{i} = {i}\n".format(i=i) for i in range(498)) +
- "if v0 > 498:\n v499 = 499\n"
- )
- st, _ = self.run_command_status("coverage run ninety_nine_eight.py")
- self.assertEqual(st, 0)
- st, out = self.run_command_status("coverage report")
- self.assertEqual(st, 0)
- self.assertEqual(
- self.last_line_squeezed(out),
- "ninety_nine_eight.py 500 1 99%"
- )
-
- st, _ = self.run_command_status("coverage report --fail-under=100")
- self.assertEqual(st, 2)
-
-
- def test_100(self):
- self.make_file("one_hundred.py",
- "".join("v{i} = {i}\n".format(i=i) for i in range(500))
- )
- st, _ = self.run_command_status("coverage run one_hundred.py")
- self.assertEqual(st, 0)
- st, out = self.run_command_status("coverage report")
- self.assertEqual(st, 0)
- self.assertEqual(
- self.last_line_squeezed(out),
- "one_hundred.py 500 0 100%"
- )
-
- st, _ = self.run_command_status("coverage report --fail-under=100")
- self.assertEqual(st, 0)
-
-
class UnicodeFilePathsTest(CoverageTest):
"""Tests of using non-ascii characters in the names of files."""