summaryrefslogtreecommitdiff
path: root/unit_tests/test_cover_plugin.py
diff options
context:
space:
mode:
authorEric Larson <larson.eric.d@gmail.com>2014-08-11 08:43:26 -0700
committerEric Larson <larson.eric.d@gmail.com>2016-01-27 14:50:26 -0500
commit049b295dccb2b40398d8e0e1e5fccbc2cdf61af8 (patch)
treefefeb069bac103661e69dbbc0a2679c1b6461ac9 /unit_tests/test_cover_plugin.py
parentcb9b82f03075e103642ca132c6c15b838437017d (diff)
downloadnose-049b295dccb2b40398d8e0e1e5fccbc2cdf61af8.tar.gz
FIX: Add simple test
Diffstat (limited to 'unit_tests/test_cover_plugin.py')
-rw-r--r--unit_tests/test_cover_plugin.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/unit_tests/test_cover_plugin.py b/unit_tests/test_cover_plugin.py
index b95c590..5999413 100644
--- a/unit_tests/test_cover_plugin.py
+++ b/unit_tests/test_cover_plugin.py
@@ -1,10 +1,8 @@
import os
-import sys
from optparse import OptionParser
from nose.config import Config
from nose.plugins.cover import Coverage
from nose.tools import eq_
-import unittest
class TestCoveragePlugin(object):
@@ -14,6 +12,11 @@ class TestCoveragePlugin(object):
['pkg1', 'pkg2', 'pkg3'], [],
'pkg1,pkg2,pkg3', 'NOSE_COVER_PACKAGE')
+ def test_cover_options_noprint(self):
+ _test_options_helper('--cover-no-print', 'coverPrint',
+ False, True,
+ env_key='NOSE_COVER_NO_PRINT')
+
def test_cover_options_erase(self):
_test_options_helper('--cover-erase', 'coverErase',
True, False,
@@ -63,6 +66,7 @@ class TestCoveragePlugin(object):
finally:
os.unlink('not_default_config_file')
+
def _test_options_helper(arg_option, cover_option,
expected_set, expected_not_set,
arg_value=None, env_key=None):