lda: test tweaks

This commit is contained in:
Robert Jördens 2016-01-26 15:22:45 -07:00
parent cda4a0765d
commit ccac8525d2
2 changed files with 3 additions and 2 deletions

View File

@ -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))

View File

@ -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):