Skip to content
Browse files

empty set is a valid cstruct

  • Loading branch information...
1 parent 554758b commit a0a0eb6489594d32e86e9f8c8da0fa81bb93f971 @domenkozar domenkozar committed Nov 10, 2012
Showing with 2 additions and 5 deletions.
  1. +1 −4 colander/__init__.py
  2. +1 −1 colander/tests/test_colander.py
View
5 colander/__init__.py
@@ -761,10 +761,7 @@ def deserialize(self, node, cstruct):
_('${cstruct} is not iterable', mapping={'cstruct': cstruct})
)
- cstruct = set(cstruct)
- if not cstruct:
- return null
- return cstruct
+ return set(cstruct)
class SequenceItems(list):
View
2 colander/tests/test_colander.py
@@ -999,7 +999,7 @@ def test_deserialize_empty_set(self):
typ = self._makeOne()
node = DummySchemaNode(typ)
result = typ.deserialize(node, set())
- self.assertEqual(result, colander.null)
+ self.assertEqual(result, set())
class TestSequence(unittest.TestCase):
def _makeOne(self, **kw):

0 comments on commit a0a0eb6

Please sign in to comment.
Something went wrong with that request. Please try again.