Skip to content

Commit 38c1328

Browse files
committed
Exclude zip files from coverage so Delete tests don't trip up coverage.
1 parent 330941f commit 38c1328

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

coverage.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
branch = true
33
parallel = true
44
omit =
5-
setup*
5+
setup*
66
.tox/*/lib/python*/site-packages/*
77
*/tests/*.py
88
*/testing/*.py
99
importlib_resources/_py${OMIT}.py
1010
importlib_resources/__init__.py
1111
importlib_resources/_compat.py
1212
importlib_resources/abc.py
13+
*.zip*
1314
plugins =
1415
coverplug
1516

importlib_resources/tests/test_resource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def setUp(self):
183183
data_path = Path(self.ZIP_MODULE.__file__)
184184
data_dir = data_path.parent
185185
self.source_zip_path = data_dir / 'ziptestdata.zip'
186-
self.zip_path = Path.cwd() / '{}.zip'.format(uuid.uuid4())
186+
self.zip_path = Path('{}.zip'.format(uuid.uuid4())).absolute()
187187
self.zip_path.write_bytes(self.source_zip_path.read_bytes())
188188
sys.path.append(str(self.zip_path))
189189
self.data = import_module('ziptestdata')

0 commit comments

Comments
 (0)