diff --git a/tests/test_tap_humanize.py b/tests/test_tap_humanize.py index 9f4bfef..d2080de 100644 --- a/tests/test_tap_humanize.py +++ b/tests/test_tap_humanize.py @@ -36,3 +36,15 @@ def test_tap_enabled_jitters_within_radius(monkeypatch): set_rng(None) px, py = driver.calls[-1][1] assert abs(px - 10) <= 5.0 and abs(py - 20) <= 5.0 + assert (px, py) != (10, 20), "jitter must move the point" + + # second call with fresh seed must differ from first + set_rng(random.Random(12)) + try: + driver2 = FakeDriver() + tap(10, 20, manager=_connected(driver2)) + finally: + set_rng(None) + px2, py2 = driver2.calls[-1][1] + assert (px2, py2) != (10, 20) + assert (px2, py2) != (px, py), "consecutive calls with different seeds must produce different jitter"