summaryrefslogtreecommitdiff
path: root/functional_tests
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2012-08-18 17:39:46 +0200
committerDomen Kožar <domen@dev.si>2012-08-18 17:39:46 +0200
commit90852641213e1c2528ac97125a61dc63ddfa95b5 (patch)
tree2c05f5a9127b82c747a4dc7cd63a443532a9aa53 /functional_tests
parent0035377858a761e0173946fafcc205cf8ae2ab74 (diff)
downloadnose-90852641213e1c2528ac97125a61dc63ddfa95b5.tar.gz
more tests
Diffstat (limited to 'functional_tests')
-rw-r--r--functional_tests/test_coverage_plugin.py28
1 files changed, 25 insertions, 3 deletions
diff --git a/functional_tests/test_coverage_plugin.py b/functional_tests/test_coverage_plugin.py
index d6fb8a6..717f13a 100644
--- a/functional_tests/test_coverage_plugin.py
+++ b/functional_tests/test_coverage_plugin.py
@@ -11,7 +11,7 @@ support = os.path.join(os.path.dirname(__file__), 'support')
class TestCoveragePlugin(PluginTester, unittest.TestCase):
activate = "--with-coverage"
- args = ['-v', '--cover-package=blah', '--cover-html']
+ args = ['-v', '--cover-package=blah', '--cover-html', '--cover-min-percentage', '25']
plugins = [Coverage()]
suitepath = os.path.join(support, 'coverage')
@@ -29,7 +29,7 @@ class TestCoveragePlugin(PluginTester, unittest.TestCase):
self.assertTrue("Ran 1 test in""" in self.output)
# Assert coverage html report exists
self.assertTrue(os.path.exists(os.path.join(self.cover_html_dir,
- 'index.html')))
+ 'index.html')))
# Assert coverage data is saved
self.assertTrue(os.path.exists(self.cover_file))
@@ -47,7 +47,29 @@ class TestCoverageMinPercentagePlugin(PluginTester, unittest.TestCase):
os.unlink(self.cover_file)
if os.path.exists(self.cover_html_dir):
shutil.rmtree(self.cover_html_dir)
- self.assertRaises(SystemExit, super(TestCoverageMinPercentagePlugin, self).setUp)
+ self.assertRaises(SystemExit,
+ super(TestCoverageMinPercentagePlugin, self).setUp)
+
+ def runTest(self):
+ pass
+
+
+class TestCoverageMinPercentageTOTALPlugin(PluginTester, unittest.TestCase):
+ activate = "--with-coverage"
+ args = ['-v', '--cover-package=blah', '--cover-package=moo',
+ '--cover-min-percentage', '100']
+ plugins = [Coverage()]
+ suitepath = os.path.join(support, 'coverage2')
+
+ def setUp(self):
+ self.cover_file = os.path.join(os.getcwd(), '.coverage')
+ self.cover_html_dir = os.path.join(os.getcwd(), 'cover')
+ if os.path.exists(self.cover_file):
+ os.unlink(self.cover_file)
+ if os.path.exists(self.cover_html_dir):
+ shutil.rmtree(self.cover_html_dir)
+ self.assertRaises(SystemExit,
+ super(TestCoverageMinPercentageTOTALPlugin, self).setUp)
def runTest(self):
pass