Files
EvoScientist-Multi/tests/test_cancel_checkpoint_cleanup_contract.py
m4 d4b53bfb08
Docker / build (push) Has been cancelled
Test / pytest (ubuntu-latest, 3.12) (push) Has been cancelled
Test / pytest (windows-latest, 3.11) (push) Has been cancelled
Test / pytest (windows-latest, 3.12) (push) Has been cancelled
Lint / ruff (push) Has been cancelled
Test / pytest (ubuntu-latest, 3.11) (push) Has been cancelled
Build / build (push) Has been cancelled
test: cover stop contract, execution adapters, checkpointer race and runtime identity
2026-09-13 15:12:17 +08:00

13 lines
534 B
Python

import inspect
from EvoScientist.langgraph_dev.http import cancel_recoverable_run
def test_cancel_deletes_run_only_after_execution_exit_receipt():
source = inspect.getsource(cancel_recoverable_run)
assert 'initial.get("execution_exited") is not True' in source
assert "await worker_exit.wait_for_exit" in source
exit_check = source.index('receipt.get("execution_exited") is True')
delete = source.index("await Runs.delete")
assert exit_check < delete
assert '"checkpoint_cleanup": "completed"' in source