mirror of
https://github.com/priyanshujain/messageboardbench.git
synced 2026-10-02 19:17:07 +00:00
Checkpoint experiments through SWE pilot v2
This commit is contained in:
1 parent
abacd5c5e1
commit
72d77018d8
845 files changed
+431756
-41
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import pytest
|
||||
|
||||
from messageboardbench.task import validate_seed_files
|
||||
|
||||
|
||||
@pytest.mark.parametrize("name", ["../escape.py", "/tmp/file", "a/b", ".", "..", "", "a\\b"])
|
||||
def test_seeds_cannot_escape_scratch(name):
|
||||
with pytest.raises(ValueError):
|
||||
validate_seed_files({name: "content"})
|
||||
|
||||
|
||||
def test_seed_is_copied_without_changing_content():
|
||||
files = {"reference.py": "# agent-written\ndef f(): return 3\n"}
|
||||
assert validate_seed_files(files) == files
|
||||
assert validate_seed_files(files) is not files
|
||||
|
||||
|
||||
def test_byte_limit_handles_multibyte_text():
|
||||
with pytest.raises(ValueError):
|
||||
validate_seed_files({"reference.py": "é" * 40000})
|
||||
Reference in new issue
Block a user