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

Commit

Permalink
Add test for recursive type
Browse files Browse the repository at this point in the history
  • Loading branch information
misakwa committed Nov 22, 2016
1 parent 4032763 commit ba74089
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,8 @@ def test_load_slots():
p_str = pickle.dumps(bob)

assert pickle.loads(p_str) == bob

# works for recursive types too
rec = thriftpy.load('parser-cases/recursive_union.thrift', use_slots=True)
rec_slots = rec.Dynamic.__slots__
assert rec_slots == ['boolean', 'integer', 'doubl', 'str', 'arr', 'object']

0 comments on commit ba74089

Please sign in to comment.