From 9f613e33f27f772682ab7d7bd2261a9c4bd014c5 Mon Sep 17 00:00:00 2001 From: Hector Fernandez Date: Wed, 15 Apr 2020 17:59:38 +0200 Subject: Allow 2 attempts to communicate to amperimeter. --- test-cli/test/tests/qamper.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test-cli/test') 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 -- cgit v1.1