forked from M-Labs/artiq
1
0
Fork 0

worker test: do not close the event loop twice

This commit is contained in:
Yann Sionneau 2015-06-04 13:44:07 +02:00
parent 60bdf74137
commit 50a6da994e
1 changed files with 11 additions and 14 deletions

View File

@ -40,21 +40,18 @@ def _call_worker(worker, expid):
def _run_experiment(experiment):
try:
expid = {
"file": sys.modules[__name__].__file__,
"experiment": experiment,
"arguments": dict()
}
handlers = {
"init_rt_results": lambda description: None
}
expid = {
"file": sys.modules[__name__].__file__,
"experiment": experiment,
"arguments": dict()
}
handlers = {
"init_rt_results": lambda description: None
}
loop = asyncio.get_event_loop()
worker = Worker(handlers)
loop.run_until_complete(_call_worker(worker, expid))
finally:
loop.close()
loop = asyncio.get_event_loop()
worker = Worker(handlers)
loop.run_until_complete(_call_worker(worker, expid))
class WatchdogCase(unittest.TestCase):