Skip to content

Commit 7840acd

Browse files
committed
Add tests for xml and html commands.
1 parent 70b2f57 commit 7840acd

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

tests/test_process.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,14 +704,25 @@ def test_fail_under_in_config(self):
704704
self.assertEqual(st, 2)
705705

706706
class FailUnderNoDataTest(CoverageTest):
707-
def test_fail_under_in_config_no_data(self):
707+
def setUp(self):
708+
super(FailUnderNoDataTest, self).setUp()
709+
708710
self.make_file(".coveragerc", "[report]\nfail_under = 99\n")
709711
if os.path.exists('.coverage'):
710712
os.remove('.coverage')
713+
714+
def test_report(self):
711715
st, _ = self.run_command_status("coverage report")
712-
print _
713716
self.assertEqual(st, 2)
714717

718+
def test_xml(self):
719+
st, _ = self.run_command_status("coverage xml")
720+
self.assertEqual(st, 1)
721+
722+
def test_html(self):
723+
st, _ = self.run_command_status("coverage html")
724+
self.assertEqual(st, 1)
725+
715726

716727
def possible_pth_dirs():
717728
"""Produce a sequence of directories for trying to write .pth files."""

0 commit comments

Comments
 (0)