Commits

Adam Lowry committed f14e732

Remove unnecessary except type, expand non-dictlike test

  • Participants
  • Parent commits df63312

Comments (0)

Files changed (2)

File flatland/schema/containers.py

         self.raw = value
         try:
             pairs = to_pairs(value)
-        except (TypeError, ValueError):
+        except TypeError:
             return False
         self._reset()
 

File tests/schema/test_dicts.py

 
 def test_set_with_non_dictlike_data():
     schema = Dict.of(Integer.named(u'x'), Integer.named(u'y'))
-    for bad in (123, 'bar', ['foo']):
+    for bad in (123, None, 'bar', ['foo'], [123]):
         el = schema()
         el.set(bad)