8000 Address coverage misses, ignored for LegacyGroupedEntryPoints. · python/importlib_metadata@2def046 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2def046

Browse files
committed
Address coverage misses, ignored for LegacyGroupedEntryPoints.
1 parent 2db4dad commit 2def046

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

importlib_metadata/__init__.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ def names(self):
180180

181181
@property
182182
def groups(self):
183+
"""
184+
For coverage while SelectableGroups is present.
185+
>>> EntryPoints().groups
186+
set()
187+
"""
183188
return set(ep.group for ep in self)
184189

185190
@classmethod
@@ -202,11 +207,16 @@ def load(cls, eps):
202207

203208
@property
204209
def groups(self):
205-
return self.keys()
210+
return set(self.keys())
206211

207212
@property
208213
def names(self):
209-
return (ep.name for ep in self._all)
214+
"""
215+
for coverage:
216+
>>> SelectableGroups().names
217+
set()
218+
"""
219+
return set(ep.name for ep in self._all)
210220

211221
@property
212222
def _all(self):
@@ -218,7 +228,7 @@ def select(self, **params):
218228
return EntryPoints(self._all).select(**params)
219229

220230

221-
class LegacyGroupedEntryPoints(EntryPoints):
231+
class LegacyGroupedEntryPoints(EntryPoints): # pragma: nocover
222232
"""
223233
Compatibility wrapper around EntryPoints to provide
224234
much of the 'dict' interface previously returned by

0 commit comments

Comments
 (0)
0