summaryrefslogtreecommitdiff
path: root/tests/test_files.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2022-12-23 15:47:15 -0500
committerNed Batchelder <ned@nedbatchelder.com>2022-12-23 16:06:46 -0500
commitda1b282d3b39a6232e4cb798838389f7b16a0795 (patch)
tree684d42ad41ea4c3c2f0879c51804078eaadcece1 /tests/test_files.py
parentd327a70d9b81833c0ce22f2046b1d93892c1e72d (diff)
downloadpython-coveragepy-git-da1b282d3b39a6232e4cb798838389f7b16a0795.tar.gz
fix: also look into .whl files for source
Diffstat (limited to 'tests/test_files.py')
-rw-r--r--tests/test_files.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test_files.py b/tests/test_files.py
index 29bd9a0d..54c91628 100644
--- a/tests/test_files.py
+++ b/tests/test_files.py
@@ -86,6 +86,7 @@ class FilesTest(CoverageTest):
("a/b/c/foo.py", "a/b/c/foo.py", True),
("a/b/c/foo.py", "a/b/c/bar.py", False),
("src/files.zip", "src/files.zip/foo.py", True),
+ ("src/files.whl", "src/files.whl/foo.py", True),
("src/files.egg", "src/files.egg/foo.py", True),
("src/files.pex", "src/files.pex/foo.py", True),
("src/files.zip", "src/morefiles.zip/foo.py", False),
@@ -93,6 +94,8 @@ class FilesTest(CoverageTest):
]
)
def test_source_exists(self, to_make, to_check, answer):
+ # source_exists won't look inside the zipfile, so it's fine to make
+ # an empty file with the zipfile name.
self.make_file(to_make, "")
assert files.source_exists(to_check) == answer