Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_abc_inheritance():
assert issubclass(MultiMapping, Mapping)
assert not issubclass(MultiMapping, MutableMapping)
assert issubclass(MutableMultiMapping, Mapping)
assert issubclass(MutableMultiMapping, MutableMapping)
def getone(self, key, default=None):
super().getone(key, default)
def test_abc_getall():
with pytest.raises(KeyError):
A().getall("key")
def test_abc_getone():
with pytest.raises(KeyError):
A().getone("key")
class B(A, MutableMultiMapping):
def __setitem__(self, key, value):
pass
def __delitem__(self, key):
pass
def add(self, key, value):
super().add(key, value)
def extend(self, *args, **kwargs):
super().extend(*args, **kwargs)
def popall(self, key, default=None):
super().popall(key, default)
def popone(self, key, default=None):
def test_proxy_inheritance(proxy_classes):
proxy, _ = proxy_classes
assert issubclass(proxy, MultiMapping)
assert not issubclass(proxy, MutableMultiMapping)