def testWorker(self): worker = pulsar.get_actor() self.assertTrue(pulsar.is_actor(worker)) self.assertTrue(worker.running()) self.assertTrue(worker.active()) self.assertFalse(worker.closed()) self.assertFalse(worker.stopped()) self.assertEqual(worker.info_state, 'running') self.assertEqual(worker.tid, current_thread().ident) self.assertEqual(worker.pid, os.getpid()) self.assertTrue(worker.impl.daemon) self.assertFalse(worker.is_monitor())
def testWorker(self): '''Test the test worker''' worker = pulsar.get_actor() self.assertTrue(pulsar.is_actor(worker)) self.assertTrue(worker.is_running()) self.assertFalse(worker.closed()) self.assertFalse(worker.stopped()) self.assertEqual(worker.info_state, 'running') self.assertNotEqual(worker.tid, current_thread().ident) self.assertEqual(worker.pid, os.getpid()) self.assertTrue(worker.impl.daemon) self.assertFalse(worker.is_monitor()) self.assertEqual(str(worker.impl), worker.impl.unique_name)