diff options
author | Ionel Cristian Maries <contact@ionelmc.ro> | 2015-06-28 21:49:21 +0300 |
---|---|---|
committer | Ionel Cristian Maries <contact@ionelmc.ro> | 2015-06-28 21:49:21 +0300 |
commit | 7840acda324d863009f12df2aaec5d1079cc5919 (patch) | |
tree | ba2a0fe73e910bd273ace1dfaf0adc2ddf88261c /tests/test_process.py | |
parent | 70b2f571185e69c0964bc7672affc91f83a7a975 (diff) | |
download | python-coveragepy-git-7840acda324d863009f12df2aaec5d1079cc5919.tar.gz |
Add tests for xml and html commands.
Diffstat (limited to 'tests/test_process.py')
-rw-r--r-- | tests/test_process.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/test_process.py b/tests/test_process.py index 24da57a6..922ea8c1 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -704,14 +704,25 @@ class FailUnderTest(CoverageTest): self.assertEqual(st, 2) class FailUnderNoDataTest(CoverageTest): - def test_fail_under_in_config_no_data(self): + def setUp(self): + super(FailUnderNoDataTest, self).setUp() + self.make_file(".coveragerc", "[report]\nfail_under = 99\n") if os.path.exists('.coverage'): os.remove('.coverage') + + def test_report(self): st, _ = self.run_command_status("coverage report") - print _ self.assertEqual(st, 2) + def test_xml(self): + st, _ = self.run_command_status("coverage xml") + self.assertEqual(st, 1) + + def test_html(self): + st, _ = self.run_command_status("coverage html") + self.assertEqual(st, 1) + def possible_pth_dirs(): """Produce a sequence of directories for trying to write .pth files.""" |