diff --git a/tests/test_native_tool_timeout.py b/tests/test_native_tool_timeout.py index 95bac8d66..c28cd201b 100644 --- a/tests/test_native_tool_timeout.py +++ b/tests/test_native_tool_timeout.py @@ -181,7 +181,7 @@ def test_inherited_dispatch_deadline_narrows_the_tool_wait(repo, monkeypatch): receipt = result.usage["native_tool_receipts"][0] assert receipt["outcome"] == "error" and receipt["source_gap"] == "native_tool_abandoned" bound = float(_tool_messages(llm)[0]["content"].split("exceeded ")[1].split("s limit")[0]) - assert 0 < bound <= 0.4 + assert 0 < bound <= 0.4 + 1e-6 # a coarse clock can return the deadline itself release.set() release_again, _holder_again = _install_registry(monkeypatch, hold_sec=3.0) diff --git a/tests/test_supervisor_loop_measurements.py b/tests/test_supervisor_loop_measurements.py index e165d580d..d90c13d04 100644 --- a/tests/test_supervisor_loop_measurements.py +++ b/tests/test_supervisor_loop_measurements.py @@ -16,6 +16,7 @@ import logging import re import threading import time +from pathlib import Path import pytest @@ -107,7 +108,7 @@ def test_stall_row_carries_phase_cpu_and_event_lag(monkeypatch, journal): _stop_watchdog(stop) stalls = [row for _path, row in journal if row["type"] == "supervisor_loop_stall"] assert len(stalls) == 1, journal - assert journal[0][0].endswith("logs/supervisor.jsonl") + assert Path(journal[0][0]).parts[-2:] == ("logs", "supervisor.jsonl") row = stalls[0] assert row["stalled_sec"] == pytest.approx(100.0, abs=1.0) assert row["phase"] == "maintenance"