Skip to content

Commit 43afaeb

Browse files
committed
Add failing test illustrating missed expectation. Ref #330.
1 parent b379ff6 commit 43afaeb

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

tests/fixtures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ class ZipFixtures:
301301
def _fixture_on_path(self, filename):
302302
pkg_file = resources.files(self.root).joinpath(filename)
303303
file = self.resources.enter_context(resources.as_file(pkg_file))
304-
assert file.name.startswith('example-'), file.name
304+
assert file.name.startswith('example'), file.name
305305
sys.path.insert(0, str(file))
306306
self.resources.callback(sys.path.pop, 0)
307307

tests/test_main.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,3 +289,11 @@ class PackagesDistributionsTest(fixtures.ZipFixtures, unittest.TestCase):
289289
def test_packages_distributions_example(self):
290290
self._fixture_on_path('example-21.12-py3-none-any.whl')
291291
assert packages_distributions()['example'] == ['example']
292+
293+
def test_packages_distributions_example2(self):
294+
"""
295+
Test packages_distributions on a wheel built
296+
by trampolim.
297+
"""
298+
self._fixture_on_path('example2-1.0.0-py3-none-any.whl')
299+
assert packages_distributions()['example2'] == ['example2']

0 commit comments

Comments
 (0)