diff options
author | Ionel Cristian Maries <contact@ionelmc.ro> | 2015-06-28 21:10:53 +0300 |
---|---|---|
committer | Ionel Cristian Maries <contact@ionelmc.ro> | 2015-06-28 21:10:53 +0300 |
commit | dc4127aa3011cd363a68040bb04770f456fa8fba (patch) | |
tree | 78b9468928ed41e18e6338ea454c5227f4527c34 /tests/test_process.py | |
parent | 790fbd51a31d86be6219247c786feee49b10a565 (diff) | |
download | python-coveragepy-git-dc4127aa3011cd363a68040bb04770f456fa8fba.tar.gz |
Make fail_under fail if there is no coverage data.
Diffstat (limited to 'tests/test_process.py')
-rw-r--r-- | tests/test_process.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_process.py b/tests/test_process.py index 1ae8e922..24da57a6 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -703,6 +703,15 @@ class FailUnderTest(CoverageTest): st, _ = self.run_command_status("coverage report") self.assertEqual(st, 2) +class FailUnderNoDataTest(CoverageTest): + def test_fail_under_in_config_no_data(self): + self.make_file(".coveragerc", "[report]\nfail_under = 99\n") + if os.path.exists('.coverage'): + os.remove('.coverage') + st, _ = self.run_command_status("coverage report") + print _ + self.assertEqual(st, 2) + def possible_pth_dirs(): """Produce a sequence of directories for trying to write .pth files.""" |