Example #1
0
File: me.py Project: cyberj/pulsar
 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())
Example #2
0
File: me.py Project: japaks/pulsar
 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)