예제 #1
0
 def test_added_listener_will_listen(self):
     listener = MockListener1()
     self.assertFalse(listener.listening)
     thisProcess.addListener(listener)
     self.assertTrue(listener.listening)
     thisProcess.removeListener(listener)
     self.assertTrue(listener.closed)
예제 #2
0
 def test_process_is_set_to_listener(self):
     listener = MockListener1()
     thisProcess.addListener(listener)
     self.assertIs(listener.p, thisProcess)