From 30d8af723c14dba9196faae397007f510eb02a76 Mon Sep 17 00:00:00 2001 From: John Szakmeister Date: Fri, 18 Apr 2014 20:25:25 -0400 Subject: Skip coverage tests correctly in Python 2.5 when coverage not available. --- functional_tests/test_coverage_plugin.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'functional_tests') diff --git a/functional_tests/test_coverage_plugin.py b/functional_tests/test_coverage_plugin.py index b4069bf..23dd8c3 100644 --- a/functional_tests/test_coverage_plugin.py +++ b/functional_tests/test_coverage_plugin.py @@ -4,6 +4,7 @@ import sys import unittest import shutil +from nose.exc import SkipTest from nose.plugins import PluginTester from nose.plugins.cover import Coverage @@ -28,7 +29,7 @@ class TestCoveragePlugin(PluginTester, unittest.TestCase): def setUp(self): if not hasCoverage: - raise unittest.SkipTest('coverage not available; skipping') + raise SkipTest('coverage not available; skipping') self.cover_file = os.path.join(os.getcwd(), '.coverage') self.cover_html_dir = os.path.join(os.getcwd(), 'cover') @@ -56,7 +57,7 @@ class TestCoverageMinPercentagePlugin(PluginTester, unittest.TestCase): def setUp(self): if not hasCoverage: - raise unittest.SkipTest('coverage not available; skipping') + raise SkipTest('coverage not available; skipping') self.cover_file = os.path.join(os.getcwd(), '.coverage') self.cover_html_dir = os.path.join(os.getcwd(), 'cover') @@ -81,7 +82,7 @@ class TestCoverageMinPercentageSinglePackagePlugin( def setUp(self): if not hasCoverage: - raise unittest.SkipTest('coverage not available; skipping') + raise SkipTest('coverage not available; skipping') self.cover_file = os.path.join(os.getcwd(), '.coverage') self.cover_html_dir = os.path.join(os.getcwd(), 'cover') @@ -107,7 +108,7 @@ class TestCoverageMinPercentageSinglePackageWithBranchesPlugin( def setUp(self): if not hasCoverage: - raise unittest.SkipTest('coverage not available; skipping') + raise SkipTest('coverage not available; skipping') self.cover_file = os.path.join(os.getcwd(), '.coverage') self.cover_html_dir = os.path.join(os.getcwd(), 'cover') @@ -133,7 +134,7 @@ class TestCoverageMinPercentageTOTALPlugin(PluginTester, unittest.TestCase): def setUp(self): if not hasCoverage: - raise unittest.SkipTest('coverage not available; skipping') + raise SkipTest('coverage not available; skipping') self.cover_file = os.path.join(os.getcwd(), '.coverage') self.cover_html_dir = os.path.join(os.getcwd(), 'cover') @@ -158,7 +159,7 @@ class TestCoverageMinPercentageWithBranchesTOTALPlugin( def setUp(self): if not hasCoverage: - raise unittest.SkipTest('coverage not available; skipping') + raise SkipTest('coverage not available; skipping') self.cover_file = os.path.join(os.getcwd(), '.coverage') self.cover_html_dir = os.path.join(os.getcwd(), 'cover') -- cgit v1.2.1