Skip to content

SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]

updated test for env utils

Talor Abramovich7e7b8d20eadb
diff --git a/tests/test_env_utils.py b/tests/test_env_utils.py
index 0dbfc009..502677d6 100644
--- a/tests/test_env_utils.py
+++ b/tests/test_env_utils.py
@@ -184,6 +184,13 @@ def test_get_instance_text_issue_gh_repo(tmp_path):
def test_load_instances(test_data_path, caplog):
test_data_sources = test_data_path / "data_sources"
- examples = list(test_data_sources.iterdir())
+ examples = [example for example in test_data_sources.iterdir() if example.is_file()]
for example in examples:
get_instances(file_path=str(example), **_TOKEN)
+
+
+def test_load_ctf_instances(test_data_path, caplog):
+ test_data_sources = test_data_path / "data_sources" / "ctf"
+ examples = list(test_data_sources.glob("**/challenge.json"))
+ for example in examples:
+ get_instances(file_path=str(example), repo_path=str(example.parent))
\ No newline at end of file