From d73006652b5d0e64785baf9c73a83348eabfaaaa Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 4 Jun 2015 11:22:03 +0800 Subject: [PATCH] test/worker: always close even if prepare() raises --- artiq/test/worker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/test/worker.py b/artiq/test/worker.py index 7f5c7ba0c..2bc3a30e3 100644 --- a/artiq/test/worker.py +++ b/artiq/test/worker.py @@ -31,8 +31,8 @@ class WatchdogTimeoutInBuild(Experiment, AutoDB): @asyncio.coroutine def _call_worker(worker, expid): - yield from worker.prepare(0, "main", expid, 0) try: + yield from worker.prepare(0, "main", expid, 0) yield from worker.run() yield from worker.analyze() finally: @@ -58,7 +58,7 @@ def _run_experiment(experiment): class WatchdogCase(unittest.TestCase): def test_watchdog_no_timeout(self): - _run_experiment("WatchdogNoTimeout") + _run_experiment("WatchdogNoTimeout") def test_watchdog_timeout(self): with self.assertRaises(WorkerWatchdogTimeout):