From 0ae5e6d8b125e957c9a4f5f434231350dd7174ca Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 22 May 2017 00:26:05 +0800 Subject: [PATCH] test_lda: more thorough and consistent test of simulation mode --- artiq/test/test_lda.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/artiq/test/test_lda.py b/artiq/test/test_lda.py index 2307f4dd2..76c9e01bd 100644 --- a/artiq/test/test_lda.py +++ b/artiq/test/test_lda.py @@ -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")