2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

test/hardware_testbench: properly close devices

This commit is contained in:
Sebastien Bourdeauducq 2016-02-23 16:00:53 +08:00
parent 5d41113dbc
commit 53d5a458a2

View File

@ -97,6 +97,9 @@ class ExperimentCase(unittest.TestCase):
self.device_db, virtual_devices={"scheduler": DummyScheduler()})
self.dataset_mgr = DatasetManager(self.dataset_db)
def tearDown(self):
self.device_mgr.close_devices()
def create(self, cls, **kwargs):
try:
exp = cls(self.device_mgr, self.dataset_mgr, **kwargs)
@ -121,5 +124,3 @@ class ExperimentCase(unittest.TestCase):
except CompileError as error:
# Reduce amount of text on terminal.
raise error from None
finally:
self.device_mgr.close_devices()