summaryrefslogtreecommitdiff
path: root/test/test_api.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_api.py')
-rw-r--r--test/test_api.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_api.py b/test/test_api.py
index 47dc3d08..e4c5970b 100644
--- a/test/test_api.py
+++ b/test/test_api.py
@@ -174,3 +174,15 @@ class ApiTest(CoverageTest):
# and some were marked executed in colorsys.py
_, statements, missing, _ = cov2.analysis("colorsys.py")
self.assertNotEqual(statements, missing)
+
+ def testExcludeList(self):
+ cov = coverage.coverage()
+ cov.clear_exclude()
+ self.assertEqual(cov.get_exclude_list(), [])
+ cov.exclude("foo")
+ self.assertEqual(cov.get_exclude_list(), ["foo"])
+ cov.exclude("bar")
+ self.assertEqual(cov.get_exclude_list(), ["foo", "bar"])
+ self.assertEqual(cov.exclude_re, "(foo)|(bar)")
+ cov.clear_exclude()
+ self.assertEqual(cov.get_exclude_list(), [])