diff --git a/tests/test_hook.py b/tests/test_hook.py index b7b69c0..1b0c7db 100644 --- a/tests/test_hook.py +++ b/tests/test_hook.py @@ -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']