diff --git a/test/test_cast.py b/test/test_cast.py index a73f21a..517f239 100644 --- a/test/test_cast.py +++ b/test/test_cast.py @@ -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)