summaryrefslogtreecommitdiff
path: root/test-cli/test/tests/qi2c.py
diff options
context:
space:
mode:
Diffstat (limited to 'test-cli/test/tests/qi2c.py')
-rw-r--r--test-cli/test/tests/qi2c.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/test-cli/test/tests/qi2c.py b/test-cli/test/tests/qi2c.py
index 409005c..2f14424 100644
--- a/test-cli/test/tests/qi2c.py
+++ b/test-cli/test/tests/qi2c.py
@@ -3,10 +3,16 @@ import unittest
class Qi2c(unittest.TestCase):
- def __init__(self, testname, testfunc, busnum, register):
+ def __init__(self, testname, testfunc, varlist):
super(Qi2c, self).__init__(testfunc)
- self.__busnum = busnum
- self.__register = register.split("/")
+ if "busnum" in varlist:
+ self.__busnum = varlist["busnum"]
+ else:
+ raise Exception('busnum param inside Qi2c must be defined')
+ if "register" in varlist:
+ self.__register = varlist["register"].split("/")
+ else:
+ raise Exception('register param inside Qi2c must be defined')
self.__devices=[]
self._testMethodDoc = testname