From 7840acda324d863009f12df2aaec5d1079cc5919 Mon Sep 17 00:00:00 2001 From: Ionel Cristian Maries Date: Sun, 28 Jun 2015 21:49:21 +0300 Subject: Add tests for xml and html commands. --- tests/test_process.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'tests/test_process.py') 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.""" -- cgit v1.2.1