Skip to content

Commit 70a7a3b

Browse files
committed
Formatting and more coverage
1 parent f706672 commit 70a7a3b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/pycardano/test_serialization.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,3 +1107,16 @@ def test_definite_list_highjacking_does_not_break_cbor2_datum():
11071107
decoded = cbor2.loads(encoded)
11081108
assert isinstance(list(decoded.keys())[0], CBORTag)
11091109
assert isinstance(list(decoded.keys())[0].value, (list, tuple))
1110+
1111+
1112+
def test_ordered_set_as_key_in_dict_indefinite_list():
1113+
a = NonEmptyOrderedSet(IndefiniteList([1, 2, 3]))
1114+
1115+
class MyTest(DictCBORSerializable):
1116+
KEY_TYPE = NonEmptyOrderedSet
1117+
VALUE_TYPE = int
1118+
1119+
d = MyTest()
1120+
d[a] = 1
1121+
1122+
check_two_way_cbor(d)

0 commit comments

Comments
 (0)