We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9524987 commit 0503366Copy full SHA for 0503366
1 file changed
qcodes/tests/test_helpers.py
@@ -239,7 +239,12 @@ def test_good_calls(self):
239
finish_clock = time.perf_counter() + secs
240
secs_out = wait_secs(finish_clock)
241
self.assertGreater(secs_out, secs - 1e-4)
242
- self.assertLessEqual(secs_out, secs)
+ # add a tiny offset as this test may fail if
243
+ # otherwise if the two calls to perf_counter are close
244
+ # enough to return the same result as a + b - a cannot
245
+ # in general be assumed to be <= b in floating point
246
+ # math (here a is perf_counter() and b is the wait time
247
+ self.assertLessEqual(secs_out, secs+1e-14)
248
249
def test_warning(self):
250
with LogCapture() as logs:
0 commit comments