Skip to content

Commit 15d6960

Browse files
committed
Add a new test capturing the new expectation.
1 parent 5a65705 commit 15d6960

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_main.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,14 @@ def test_valid_dists_preferred(self):
155155
dist = Distribution.from_name('foo')
156156
assert dist.version == "1.0"
157157

158+
def test_missing_metadata(self):
159+
"""
160+
Dists with a missing metadata file should return None.
161+
"""
162+
fixtures.build_files(self.make_pkg('foo-4.3', files={}), self.site_dir)
163+
assert Distribution.from_name('foo').metadata is None
164+
assert metadata('foo') is None
165+
158166

159167
class NonASCIITests(fixtures.OnSysPath, fixtures.SiteDir, unittest.TestCase):
160168
@staticmethod

0 commit comments

Comments
 (0)