Skip to content

Commit

Permalink
Add test capturing failure. Ref #344.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Aug 26, 2021
1 parent 15df009 commit f00d5c3
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion tests/test_main.py
Expand Up @@ -285,7 +285,7 @@ def test_unicode_dir_on_sys_path(self):
list(distributions())


class PackagesDistributionsTest(fixtures.ZipFixtures, unittest.TestCase):
class PackagesDistributionsPrebuiltTest(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']
Expand All @@ -297,3 +297,24 @@ def test_packages_distributions_example2(self):
"""
self._fixture_on_path('example2-1.0.0-py3-none-any.whl')
assert packages_distributions()['example2'] == ['example2']


class PackagesDistributionsTest(
fixtures.OnSysPath, fixtures.SiteDir, unittest.TestCase
):
def test_packages_distributions_neither_toplevel_nor_files(self):
"""
Test a package built without 'top-level.txt' or a file list.
"""
fixtures.build_files(
{
'trim_example-1.0.0.dist-info': {
'METADATA': """
Name: trim_example
Version: 1.0.0
""",
}
},
prefix=self.site_dir,
)
packages_distributions()

0 comments on commit f00d5c3

Please sign in to comment.