forked from M-Labs/artiq
lda: test tweaks
This commit is contained in:
parent
cda4a0765d
commit
ccac8525d2
|
@ -25,7 +25,7 @@ def get_from_ddb(*path, default="skip"):
|
||||||
try:
|
try:
|
||||||
for p in path:
|
for p in path:
|
||||||
v = v[p]
|
v = v[p]
|
||||||
return v.read
|
return v
|
||||||
except KeyError:
|
except KeyError:
|
||||||
if default == "skip":
|
if default == "skip":
|
||||||
raise unittest.SkipTest("device db path {} not found".format(path))
|
raise unittest.SkipTest("device db path {} not found".format(path))
|
||||||
|
|
|
@ -13,7 +13,8 @@ class GenericLdaTest:
|
||||||
for i in test_vector:
|
for i in test_vector:
|
||||||
with self.subTest(i=i):
|
with self.subTest(i=i):
|
||||||
self.cont.set_attenuation(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):
|
class TestLda(GenericLdaTest, unittest.TestCase):
|
||||||
|
|
Loading…
Reference in New Issue