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)
def test_process_is_set_to_listener(self): listener = MockListener1() thisProcess.addListener(listener) self.assertIs(listener.p, thisProcess)