summaryrefslogtreecommitdiff
path: root/tests/test_api.py
diff options
context:
space:
mode:
authorloic@dachary.org <loic@dachary.org>2017-01-10 22:38:56 +0100
committerloic@dachary.org <loic@dachary.org>2017-01-10 22:38:56 +0100
commiteb2d5d51543fe8be292dd3643e50913901d4a736 (patch)
treebbf6e8c6213a4bc77fddee2b42058f614ea443e0 /tests/test_api.py
parentffc050e243b4c329f582372dd49c55aa225197b9 (diff)
downloadpython-coveragepy-git-eb2d5d51543fe8be292dd3643e50913901d4a736.tar.gz
simplify --source=pkg test cases
Instead of adding a new test, fix the existing test. It succeeded but was not actually testing the expected code path because pkg1 is both a directory and a package. --HG-- branch : issue-426
Diffstat (limited to 'tests/test_api.py')
-rw-r--r--tests/test_api.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/test_api.py b/tests/test_api.py
index 6f142100..35ac6440 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -461,12 +461,11 @@ class SourceOmitIncludeTest(OmitIncludeTestsMixin, CoverageTest):
summary[k[:-3]] = v
return summary
- def test_source_package(self):
- lines = self.coverage_usepkgs(source=["pkg1"])
- self.filenames_in(lines, "p1a p1b")
+ def test_source_package_unexecuted(self):
+ lines = self.coverage_usepkgs(source=["pkg1.sub"])
self.filenames_not_in(lines, "p2a p2b othera otherb osa osb")
# Because source= was specified, we do search for unexecuted files.
- self.assertEqual(lines['p1c'], 0)
+ self.assertEqual(lines['runmod3'], 0)
def test_source_package_dotted(self):
lines = self.coverage_usepkgs(source=["pkg1.p1b"])