def test_symbolics(): a = Symbol('a') id = IntDiv(a, 3) pkl_id = pickle.dumps(id) new_id = pickle.loads(pkl_id) assert id == new_id ffp = FunctionFromPointer('foo', a, ['b', 'c']) pkl_ffp = pickle.dumps(ffp) new_ffp = pickle.loads(pkl_ffp) assert ffp == new_ffp li = ListInitializer(['a', 'b']) pkl_li = pickle.dumps(li) new_li = pickle.loads(pkl_li) assert li == new_li
def make_sharedptr_funcall(call, params, sharedptr): return FunctionFromPointer(call, FunctionFromPointer('get', sharedptr), params)