summaryrefslogtreecommitdiff
path: root/test-cli
diff options
context:
space:
mode:
authorHector Fernandez <hector@iatec.biz>2020-04-15 17:59:38 +0200
committerHector Fernandez <hector@iatec.biz>2020-04-15 17:59:38 +0200
commit9f613e33f27f772682ab7d7bd2261a9c4bd014c5 (patch)
treeed9b56bac01ebe032bdb875117bb0a708df050e8 /test-cli
parent47b65a71d5db142c73a0566f132af6eee3b0c2a9 (diff)
downloadboard-9f613e33f27f772682ab7d7bd2261a9c4bd014c5.zip
board-9f613e33f27f772682ab7d7bd2261a9c4bd014c5.tar.gz
board-9f613e33f27f772682ab7d7bd2261a9c4bd014c5.tar.bz2
Allow 2 attempts to communicate to amperimeter.
Diffstat (limited to 'test-cli')
-rw-r--r--test-cli/test/tests/qamper.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test-cli/test/tests/qamper.py b/test-cli/test/tests/qamper.py
index b3ab8b1..c611fdb 100644
--- a/test-cli/test/tests/qamper.py
+++ b/test-cli/test/tests/qamper.py
@@ -27,9 +27,11 @@ class Qamper(unittest.TestCase):
self.fail("failed: can not open serial port")
return
# check if the amperimeter is connected and working
+ # 2 ATTEMTS
if not amp.hello():
- self.fail("failed: can not communicate")
- return
+ if not amp.hello():
+ self.fail("failed: can not communicate")
+ return
# get current value (in Amperes)
result = amp.getCurrent()
# close serial connection