def test_terminal(self, thread_pool: SimplePool): try: thread_pool.initial() thread_pool.async_apply(tasks_size=Task_Size, function=lambda a: a + a, args=(1, )) thread_pool.terminal() except Exception as e: assert False, "It should work finely without any issue. Please check it." else: assert True, "It work finely without any issue."
def test_terminal(self, simple_pool: SimplePool): try: simple_pool.initial() simple_pool.async_apply(tasks_size=Task_Size, function=lambda a: a + a, args=(1, )) simple_pool.terminal() except Exception: assert False, f"It should work finely without any issue. Please check it.\n Error: {traceback.format_exc()}" else: assert True, "It work finely without any issue."