mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
test(cron): update _isolate_tick_lock fixture for _get_lock_paths
After PR #13725 replaced the module-level _LOCK_DIR/_LOCK_FILE constants with a dynamic _get_lock_paths() helper, the xdist-isolation fixture needs to patch the function instead of the removed constants.
This commit is contained in:
parent
969bfff449
commit
b014a3d315
3 changed files with 8 additions and 6 deletions
|
|
@ -2055,8 +2055,8 @@ class TestParallelTick:
|
|||
"""Point the tick file lock at a per-test temp dir to avoid xdist contention."""
|
||||
lock_dir = tmp_path / "cron"
|
||||
lock_dir.mkdir()
|
||||
with patch("cron.scheduler._LOCK_DIR", lock_dir), \
|
||||
patch("cron.scheduler._LOCK_FILE", lock_dir / ".tick.lock"):
|
||||
lock_file = lock_dir / ".tick.lock"
|
||||
with patch("cron.scheduler._get_lock_paths", return_value=(lock_dir, lock_file)):
|
||||
yield
|
||||
|
||||
def test_parallel_jobs_run_concurrently(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue