test_replay.py 822 B

123456789101112131415161718192021222324252627
  1. import subprocess
  2. from run_replay import get_args, main
  3. import pytest
  4. @pytest.mark.slow
  5. def test_model_replay():
  6. # fixme: might make sure that path to test data is independent of CWD
  7. args = [
  8. "--traj_path",
  9. "tests/test_data/trajectories/gpt4__klieret__swe-agent-test-repo__default_from_url__t-0.00__p-0.95__c-3.00__install-1/klieret__swe-agent-test-repo-i1.traj",
  10. "--data_path",
  11. "https://github.com/klieret/swe-agent-test-repo/issues/1",
  12. "--config_file",
  13. "config/default_from_url.yaml",
  14. "--raise_exceptions=True",
  15. ]
  16. args, remaining_args = get_args(args)
  17. main(**vars(args), forward_args=remaining_args)
  18. def test_run_cli_help():
  19. args = [
  20. "python",
  21. "run_replay.py",
  22. "--help",
  23. ]
  24. subprocess.run(args, check=True)