def test_collision_handler_pusher_pickle(): from panda3d.core import CollisionHandlerPusher collider1 = NodePath(CollisionNode("collider1")) collider2 = NodePath(CollisionNode("collider2")) target1 = NodePath("target1") target2 = NodePath("target2") handler = CollisionHandlerPusher() handler.add_again_pattern("again pattern") handler.add_collider(collider1, target1) handler.add_collider(collider2, target2) handler.horizontal = True handler = loads(dumps(handler, -1)) assert tuple(handler.in_patterns) == () assert tuple(handler.again_patterns) == ("again pattern", ) assert tuple(handler.out_patterns) == () assert not handler.has_center() assert handler.horizontal