Skip to content

Commit

Permalink
Add failing test illustrating missed expectation. Ref #330.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Aug 14, 2021
1 parent b379ff6 commit 43afaeb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/fixtures.py
Expand Up @@ -301,7 +301,7 @@ class ZipFixtures:
def _fixture_on_path(self, filename):
pkg_file = resources.files(self.root).joinpath(filename)
file = self.resources.enter_context(resources.as_file(pkg_file))
assert file.name.startswith('example-'), file.name
assert file.name.startswith('example'), file.name
sys.path.insert(0, str(file))
self.resources.callback(sys.path.pop, 0)

Expand Down
8 changes: 8 additions & 0 deletions tests/test_main.py
Expand Up @@ -289,3 +289,11 @@ class PackagesDistributionsTest(fixtures.ZipFixtures, unittest.TestCase):
def test_packages_distributions_example(self):
self._fixture_on_path('example-21.12-py3-none-any.whl')
assert packages_distributions()['example'] == ['example']

def test_packages_distributions_example2(self):
"""
Test packages_distributions on a wheel built
by trampolim.
"""
self._fixture_on_path('example2-1.0.0-py3-none-any.whl')
assert packages_distributions()['example2'] == ['example2']

0 comments on commit 43afaeb

Please sign in to comment.