def test_can_encode_point_but_not_decode(self): points_encoded = ReprValueProtocol.write(None, Point(1, 4)) self.assertCantDecode(ReprValueProtocol, points_encoded)
def test_uses_repr_format(self): VALUE = {'foo': {'bar': 3}, 'baz': None, 'quz': ['a', 1]} self.assertEqual((None, VALUE), ReprValueProtocol.read(repr(VALUE))) self.assertEqual(repr(VALUE), ReprValueProtocol.write(None, VALUE))