Пример #1
0
 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
Пример #2
0
 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
Пример #3
0
 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()
Пример #4
0
 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()