forked from M-Labs/artiq
tests: misc fixes, cleanup
This commit is contained in:
parent
107e2fedf4
commit
d05d720b19
|
@ -65,6 +65,5 @@ class ControllerCase(unittest.TestCase):
|
||||||
async def test():
|
async def test():
|
||||||
await self.start("lda_sim", entry)
|
await self.start("lda_sim", entry)
|
||||||
remote = await self.get_client(entry["host"], entry["port"])
|
remote = await self.get_client(entry["host"], entry["port"])
|
||||||
await remote.close()
|
|
||||||
|
|
||||||
self.loop.run_until_complete(test())
|
self.loop.run_until_complete(test())
|
||||||
|
|
|
@ -46,6 +46,7 @@ class ControllerCase(unittest.TestCase):
|
||||||
def stop_controller(self, name, default_timeout=1):
|
def stop_controller(self, name, default_timeout=1):
|
||||||
entry, proc = self.controllers[name]
|
entry, proc = self.controllers[name]
|
||||||
t = entry.get("term_timeout", default_timeout)
|
t = entry.get("term_timeout", default_timeout)
|
||||||
|
proc.terminate()
|
||||||
try:
|
try:
|
||||||
proc.wait(t)
|
proc.wait(t)
|
||||||
except subprocess.TimeoutExpired:
|
except subprocess.TimeoutExpired:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import unittest
|
import unittest
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from artiq.devices.thorlabs_tcube.driver import Tdc, Tpz, TdcSim, TpzSim
|
from artiq.devices.thorlabs_tcube.driver import TdcSim, TpzSim
|
||||||
from artiq.language.units import V
|
from artiq.language.units import V
|
||||||
from artiq.test.hardware_testbench import ControllerCase
|
from artiq.test.hardware_testbench import ControllerCase
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue