Kaydet (Commit) 65e5860f authored tarafından Anthony Sottile's avatar Anthony Sottile Kaydeden (comit) Barry Warsaw

cross port importlib-metadata PR #76 (#13903)

https://gitlab.com/python-devs/importlib_metadata/merge_requests/76
üst 03d5831a
......@@ -89,6 +89,8 @@ class EntryPoint(collections.namedtuple('EntryPointBase', 'name value group')):
@classmethod
def _from_text(cls, text):
config = ConfigParser()
# case sensitive: https://stackoverflow.com/q/1611799/812183
config.optionxform = str
try:
config.read_string(text)
except AttributeError: # pragma: nocover
......
......@@ -26,6 +26,8 @@ class TestZip(unittest.TestCase):
scripts = dict(entry_points()['console_scripts'])
entry_point = scripts['example']
self.assertEqual(entry_point.value, 'example:main')
entry_point = scripts['Example']
self.assertEqual(entry_point.value, 'example:main')
def test_missing_metadata(self):
self.assertIsNone(distribution('example').read_text('does not exist'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment