We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a65705 commit e4351c2Copy full SHA for e4351c2
tests/test_main.py
@@ -155,6 +155,16 @@ def test_valid_dists_preferred(self):
155
dist = Distribution.from_name('foo')
156
assert dist.version == "1.0"
157
158
+ def test_missing_metadata(self):
159
+ """
160
+ Dists with a missing metadata file should return None.
161
+
162
+ Ref python/importlib_metadata#493.
163
164
+ fixtures.build_files(self.make_pkg('foo-4.3', files={}), self.site_dir)
165
+ assert Distribution.from_name('foo').metadata is None
166
+ assert metadata('foo') is None
167
168
169
class NonASCIITests(fixtures.OnSysPath, fixtures.SiteDir, unittest.TestCase):
170
@staticmethod
0 commit comments