Skip to content

Commit

Permalink
Test exception when trying to serialize duplicated annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
aperezdc committed Nov 27, 2015
1 parent 06de071 commit 77eac66
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/test_cast.py
Expand Up @@ -192,4 +192,8 @@ def obj_value(obj):
text = hipack.dumps({"item": h}, value=obj_value)
self.assertEqual(six.u(expected), _U(text))

def test_serialize_duplicate_annotation(self):
with self.assertRaises(ValueError):
hipack.dumps({"x":0}, value=lambda x: (x, ("a", "a")))

unpack_data(TestValue)

0 comments on commit 77eac66

Please sign in to comment.