diff --git a/tests/unit/infra/setup/test_self_update.py b/tests/unit/infra/setup/test_self_update.py index d6989daba8..3266f284cd 100644 --- a/tests/unit/infra/setup/test_self_update.py +++ b/tests/unit/infra/setup/test_self_update.py @@ -1168,7 +1168,10 @@ def cold_install( monkeypatch.setattr(self_update, "_run_install_cmd", cold_install) result = self_update._run_managed_upgrade(version="1.0.2b5", locale="en") assert result.success is (portable and installer == "pip") - assert budgets == ([90, 900] if portable and installer == "pip" else [90]) + # The budget is (deadline - now) in float seconds, so it can land a ULP + # under 900 when time.monotonic() is large (long-running CI hosts). + expected = [90, 900] if portable and installer == "pip" else [90] + assert budgets == pytest.approx(expected) # The desktop launcher compares versions with its own Go implementation