Skip to content
This repository was archived by the owner on Dec 10, 2018. It is now read-only.

Commit ba74089

Browse files
author
misakwa
committed
Add test for recursive type
1 parent 4032763 commit ba74089

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test_hook.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,8 @@ def test_load_slots():
130130
p_str = pickle.dumps(bob)
131131

132132
assert pickle.loads(p_str) == bob
133+
134+
# works for recursive types too
135+
rec = thriftpy.load('parser-cases/recursive_union.thrift', use_slots=True)
136+
rec_slots = rec.Dynamic.__slots__
137+
assert rec_slots == ['boolean', 'integer', 'doubl', 'str', 'arr', 'object']

0 commit comments

Comments
 (0)