summaryrefslogtreecommitdiff
path: root/tests/test_api.py
diff options
context:
space:
mode:
authorDanny Allen <me@dannya.com>2014-08-11 16:13:06 +0100
committerDanny Allen <me@dannya.com>2014-08-11 16:13:06 +0100
commite38016c499921dd7bf5919a699a76305a1936129 (patch)
tree07a4125732561f2489dfb6b75a339cfef46d80d4 /tests/test_api.py
parentc81183f614ca982cd2ed93ac8e6e76610d162202 (diff)
parentee5ea987f8978d91c1ef189fe4f334511ddf6215 (diff)
downloadpython-coveragepy-git-e38016c499921dd7bf5919a699a76305a1936129.tar.gz
Merged ned/coveragepy into default
Diffstat (limited to 'tests/test_api.py')
-rw-r--r--tests/test_api.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/test_api.py b/tests/test_api.py
index 097947d2..31bfc57f 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -100,7 +100,7 @@ class ApiTest(CoverageTest):
"""Assert that the files here are `files`, ignoring the usual junk."""
here = os.listdir(".")
here = self.clean_files(here, ["*.pyc", "__pycache__"])
- self.assertSameElements(here, files)
+ self.assertCountEqual(here, files)
def test_unexecuted_file(self):
cov = coverage.coverage()
@@ -221,7 +221,7 @@ class ApiTest(CoverageTest):
self.assertEqual(cov.get_exclude_list(), ["foo"])
cov.exclude("bar")
self.assertEqual(cov.get_exclude_list(), ["foo", "bar"])
- self.assertEqual(cov._exclude_regex('exclude'), "(foo)|(bar)")
+ self.assertEqual(cov._exclude_regex('exclude'), "(?:foo)|(?:bar)")
cov.clear_exclude()
self.assertEqual(cov.get_exclude_list(), [])
@@ -233,7 +233,9 @@ class ApiTest(CoverageTest):
self.assertEqual(cov.get_exclude_list(which='partial'), ["foo"])
cov.exclude("bar", which='partial')
self.assertEqual(cov.get_exclude_list(which='partial'), ["foo", "bar"])
- self.assertEqual(cov._exclude_regex(which='partial'), "(foo)|(bar)")
+ self.assertEqual(
+ cov._exclude_regex(which='partial'), "(?:foo)|(?:bar)"
+ )
cov.clear_exclude(which='partial')
self.assertEqual(cov.get_exclude_list(which='partial'), [])