Skip to content

Commit f12c337

Browse files
authored
Fix test failures with importlib-metadata 8.7.0 (#43)
* Attempt to fix test failures with `importlib-metadata` 8.7.0
1 parent f443c2e commit f12c337

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_convert.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def can_convert(self, docstring):
7575

7676
class MockEntryPoint(EntryPoint):
7777
def load(self):
78-
return self.value
78+
return globals()[self.attr]
7979

8080
dist = None
8181

@@ -111,7 +111,7 @@ def test_adding_entry_point():
111111
mock_entry_point = MockEntryPoint(
112112
name='high-priority-converter',
113113
group='docstring_to_markdown',
114-
value=HighPriorityConverter,
114+
value="here:HighPriorityConverter",
115115
)
116116
with custom_entry_points([*original_entry_points, mock_entry_point]):
117117
assert convert('test') == 'HighPriority'
@@ -123,7 +123,7 @@ def test_replacing_entry_point():
123123
mock_entry_point = DistMockEntryPoint(
124124
name='cpython',
125125
group='docstring_to_markdown',
126-
value=CustomCPythonConverter
126+
value="here:CustomCPythonConverter",
127127
)
128128
with custom_entry_points([*original_entry_points, mock_entry_point]):
129129
assert convert('test') == 'test'

0 commit comments

Comments
 (0)