You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[watchdog] Fix python syntax error in test_watchdog.py (#2022)
* Fix python syntax issues in test_watchdog.py
Change-Id: I93a51f80ac8a6fc72d408031c5f0404e748ec14d
* Fix tuple index out of range issue
Change-Id: I45e46d926b5a8334d3dbfa8f47e1d42256e483b1
ifself.expect(actual_timeout>=watchdog_timeout, "watchdog arm with {} seconds failed".format(watchdog_timeout)):
121
121
ifself.expect(remaining_time>0, "Remaining_time {} seconds is not valid".format(remaining_time)):
122
-
self.expect(remaining_time<=actual_timeout, "Remaining_time {} seconds should be less than watchdog armed timeout {} seconds".format(remaining_timeout, actual_timeout))
122
+
self.expect(remaining_time<=actual_timeout, "Remaining_time {} seconds should be less than watchdog armed timeout {} seconds".format(remaining_time, actual_timeout))
self.expect(actual_timeout==actual_timeout_new, "{}: new watchdog timeout {} seconds setting should be same as the previous actual watchdog timeout {} seconds".format(test_periodic_arm.__name__, actual_timeout_new, actual_timeout))
142
-
self.expect(remaining_time_new>remaining_time, "{}: new remaining timeout {} seconds should be greater than the previous remaining timeout {} seconds by {} seconds".format(test_periodic_arm.__name__, remaining_time_new, remaining_time, TEST_WAIT_TIME_SECONDS))
141
+
self.expect(actual_timeout==actual_timeout_new, "{}: new watchdog timeout {} seconds setting should be same as the previous actual watchdog timeout {} seconds".format(self.test_periodic_arm.__name__, actual_timeout_new, actual_timeout))
142
+
self.expect(remaining_time_new>remaining_time, "{}: new remaining timeout {} seconds should be greater than the previous remaining timeout {} seconds by {} seconds".format(self.test_periodic_arm.__name__, remaining_time_new, remaining_time, TEST_WAIT_TIME_SECONDS))
self.expect(actual_timeout<actual_timeout_greater, "{}: 1st timeout {} seconds should be less than 2nd timeout {} seconds".format(test_arm_different_timeout_greater.__name__, actual_timeout, actual_timeout_greater))
158
+
self.expect(actual_timeout<actual_timeout_greater, "{}: 1st timeout {} seconds should be less than 2nd timeout {} seconds".format(self.test_arm_different_timeout_greater.__name__, actual_timeout, actual_timeout_greater))
self.expect(remaining_time_smaller<remaining_time, "{}: 2nd remaining_timeout {} seconds should be less than 1st remaining timeout {} seconds".format(test_arm_different_timeout_smaller.__name__, remaining_time_smaller, remaining_time))
179
+
self.expect(remaining_time_smaller<remaining_time, "{}: 2nd remaining_timeout {} seconds should be less than 1st remaining timeout {} seconds".format(self.test_arm_different_timeout_smaller.__name__, remaining_time_smaller, remaining_time))
self.expect(actual_timeout==-1, "{}: Watchdog should be disarmed, but returned timeout of {} seconds".format(test_arm_too_big_timeout.__name__, watchdog_timeout))
192
+
self.expect(actual_timeout==-1, "{}: Watchdog should be disarmed, but returned timeout of {} seconds".format(self.test_arm_too_big_timeout.__name__, watchdog_timeout))
self.expect(actual_timeout==-1, "{}: Watchdog should be disarmed, but returned timeout of {} seconds".format(test_arm_negative_timeout.__name__, watchdog_timeout))
201
+
self.expect(actual_timeout==-1, "{}: Watchdog should be disarmed, but returned timeout of {} seconds".format(self.test_arm_negative_timeout.__name__, watchdog_timeout))
0 commit comments