Skip to content

Commit

Permalink
Add tests for xml and html commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
ionelmc committed Jun 28, 2015
1 parent 70b2f57 commit 7840acd
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,14 +704,25 @@ def test_fail_under_in_config(self):
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."""
Expand Down

0 comments on commit 7840acd

Please sign in to comment.