Skip to content

Commit

Permalink
Add test capturing that a missing key raises a KeyError. Ref #371.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Dec 17, 2022
1 parent 7662a60 commit f2e9c39
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_api.py
Expand Up @@ -141,6 +141,15 @@ def test_importlib_metadata_version(self):
resolved = version('importlib-metadata')
assert re.match(self.version_pattern, resolved)

@__import__('pytest').mark.xfail(reason="not implemented #371")
def test_missing_key(self):
"""
Attempting to request missing metadata raises KeyError.
"""
md = metadata('distinfo-pkg')
with self.assertRaises(KeyError):
md['does-not-exist']

@staticmethod
def _test_files(files):
root = files[0].root
Expand Down

0 comments on commit f2e9c39

Please sign in to comment.