def setUp(self): self.old = dict(_SCENARIO) self.oldsetup = dict(_FIXTURES) util._STOP = False util._STOP_WHY = [] util._TIMER = None self.policy = asyncio.get_event_loop_policy() _SCENARIO.clear() _FIXTURES.clear()
def tearDown(self): _SCENARIO.clear() _FIXTURES.clear() _FIXTURES.update(self.oldsetup) asyncio.set_event_loop_policy(self.policy)
def _init_molotov(): from molotov.api import _SCENARIO, _FIXTURES _SCENARIO.clear() _FIXTURES.clear() asyncio.set_event_loop(asyncio.new_event_loop())
def tearDown(self): _SCENARIO[:] = self.old _FIXTURES.clear() _FIXTURES.update(self.oldsetup)