Пример #1
0
 def test_double_initialization(self):
     try:
         ProcessContext.set_current_process(PROCESS_GC)
         ProcessContext.set_current_process(PROCESS_SUPERVISOR)
         self.assertTrue(False, 'set_current_process should not allow double initialization')
     except AttributeError:
         self.assertTrue(True)
Пример #2
0
 def test_initialized(self):
     try:
         ProcessContext.set_current_process(PROCESS_GC)
         self.assertEqual(PROCESS_GC, ProcessContext.get_current_process())
     except AttributeError:
         self.assertTrue(False, 'get_current_process should return valid current_process')