test_lda: more thorough and consistent test of simulation mode

This commit is contained in:
Sebastien Bourdeauducq 2017-05-22 00:26:05 +08:00
parent 3ed70afaa1
commit 0ae5e6d8b1
1 changed files with 18 additions and 3 deletions

View File

@ -1,8 +1,9 @@
import unittest
import sys
from artiq.devices.lda.driver import Ldasim
from artiq.language.units import dB
from artiq.test.hardware_testbench import ControllerCase
from artiq.test.hardware_testbench import GenericControllerCase, ControllerCase
class GenericLdaTest:
@ -24,6 +25,20 @@ class TestLda(ControllerCase, GenericLdaTest):
self.cont = self.device_mgr.get("lda")
class TestLdaSim(GenericLdaTest, unittest.TestCase):
class TestLdaSim(GenericControllerCase, GenericLdaTest):
def get_device_db(self):
return {
"lda": {
"type": "controller",
"host": "::1",
"port": 3253,
"command": (sys.executable.replace("\\", "\\\\")
+ " -m artiq.frontend.aqctl_lda "
+ "-p {port} --simulation")
}
}
def setUp(self):
self.cont = Ldasim()
GenericControllerCase.setUp(self)
self.start_controller("lda")
self.cont = self.device_mgr.get("lda")