From ccac8525d2336086de30bbe24a979aa2fba8040e Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Tue, 26 Jan 2016 15:22:45 -0700 Subject: [PATCH] lda: test tweaks --- artiq/test/hardware_testbench.py | 2 +- artiq/test/lda.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/artiq/test/hardware_testbench.py b/artiq/test/hardware_testbench.py index aa6c9d39e..721802b87 100644 --- a/artiq/test/hardware_testbench.py +++ b/artiq/test/hardware_testbench.py @@ -25,7 +25,7 @@ def get_from_ddb(*path, default="skip"): try: for p in path: v = v[p] - return v.read + return v except KeyError: if default == "skip": raise unittest.SkipTest("device db path {} not found".format(path)) diff --git a/artiq/test/lda.py b/artiq/test/lda.py index 5231b7964..a477ea535 100644 --- a/artiq/test/lda.py +++ b/artiq/test/lda.py @@ -13,7 +13,8 @@ class GenericLdaTest: for i in test_vector: with self.subTest(i=i): self.cont.set_attenuation(i) - self.assertEqual(i, self.cont.get_attenuation()) + j = self.cont.get_attenuation() + self.assertEqual(i, j) class TestLda(GenericLdaTest, unittest.TestCase):