Add test capturing expectation that keyring should load degenerately if no metadata is present. Ref
@@ -3,6 +3,8 @@ try:
except ImportError:
import importlib_metadata as metadata
+from keyring import backend
+
def test_entry_point():
"""
@@ -11,3 +13,11 @@ def test_entry_point():
"""
scripts = dict(metadata.entry_points()['console_scripts'])
assert callable(scripts['keyring'].load())
+
+
+def test_missing_metadata(monkeypatch):
+ """
+ _load_plugins should pass when keyring metadata is missing.
+ """
+ monkeypatch.setattr(metadata, 'entry_points', dict)
+ backend._load_plugins()
