def test_cleanup(): baseplate = Lego(None, threading.Lock()) baseplate.add_child(Lego) child = baseplate.children[0] child.stop() baseplate.cleanup() assert(len(baseplate.children) == 0) # nosec
def test_cleanup(): baseplate = Lego(None, threading.Lock()) baseplate.add_child(Lego) child = baseplate.children[0] child.stop() baseplate.cleanup() assert (len(baseplate.children) == 0) # nosec
def test_add_child(): baseplate = Lego(None, threading.Lock()) baseplate.add_child(Lego) child = baseplate.children[0] assert(isinstance(child, pykka.ActorRef)) # nosec child_proxy = child.proxy() child_proxy.add_child(Lego) child_children = child_proxy.children.get() assert(isinstance(child_children[0], pykka.ActorRef)) # nosec child_children[0].stop() child.stop()
def test_add_child(): baseplate = Lego(None, threading.Lock()) baseplate.add_child(Lego) child = baseplate.children[0] assert (isinstance(child, pykka.ActorRef)) # nosec child_proxy = child.proxy() child_proxy.add_child(Lego) child_children = child_proxy.children.get() assert (isinstance(child_children[0], pykka.ActorRef)) # nosec child_children[0].stop() child.stop()