don't cover exceptional behavior in params
@@ -79,14 +79,14 @@ class DITParams(dict):
dict.__init__(self, *args, **kwargs)
def __setitem__(self, key, val):
- if key in _deprecated_map.keys():
+ if key in _deprecated_map.keys(): # pragma: no cover
alt = _deprecated_map[key]
msg = "%r is deprecated. Use %r instead."
warnings.warn(msg % (key, alt), DeprecationWarning, stacklevel=2)
try:
cval = self.validate[key](val)
- except KeyError:
+ except KeyError: # pragma: no cover
msg = '%r is not a valid dit parameter. ' % key
msg += 'See ditParams.keys() for a list of valid parameters.'
raise KeyError(msg)
@@ -94,7 +94,7 @@ class DITParams(dict):
dict.__setitem__(self, key, cval)
def __getitem__(self, key):
- if key in _deprecated_map.keys():
+ if key in _deprecated_map.keys(): # pragma: no cover
alt = _deprecated_map[key]
msg = "%r is deprecated. Use %r instead."
warnings.warn(msg % (key, alt), DeprecationWarning, stacklevel=2)
