def setUp(self): super(EngineTestCase, self).setUp() self._main_thread = thread.get_ident() self._main_process = multiprocessing.current_process().name
def check_the_same_thread(): return thread.get_ident() == self._main_thread