allow all animation thread tests to be +/- 1 frame
@@ -90,12 +90,13 @@ def test_animation_thread_variants(qtbot, nframes, fps, mode, rng, result):
current = thread.go()
if rng:
nrange = rng[1] - rng[0] + 1
- assert current == rng[0] + result(nframes, nrange)
+ expected = rng[0] + result(nframes, nrange)
+ assert expected - 1 <= current <= expected + 1
else:
expected = result(nframes, thread.nz)
# assert current == expected
# relaxing for CI OSX tests
- assert expected <= current <= expected + 1
+ assert expected - 1 <= current <= expected + 1
def test_animation_thread_once(qtbot):
