Skip to content

Commit 3c278b5

Browse files
committed
test_run_and_test_single_issue
1 parent ffa9188 commit 3c278b5

File tree

3 files changed

+43
-19
lines changed

3 files changed

+43
-19
lines changed

tests/test_cli.py

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import subprocess
2+
3+
4+
def test_smoke_test():
5+
subprocess.run(["python", "eval/scripts/gencode_json.py", "--help"], check=True)
6+
7+
8+
def test_run_gencode_dummy_model(tmpdir):
9+
cmd = [
10+
"python",
11+
"eval/scripts/gencode_json.py",
12+
"--model",
13+
"dummy",
14+
"--output-dir",
15+
str(tmpdir),
16+
"--prompt-dir",
17+
str(tmpdir / "prompts"),
18+
]
19+
subprocess.run(cmd, check=True)
20+
21+
22+
def test_run_and_test_single_issue(tmpdir):
23+
cmd = [
24+
"python",
25+
"eval/scripts/gencode_json.py",
26+
"--model",
27+
"dummy",
28+
"--output-dir",
29+
str(tmpdir),
30+
"--prompt-dir",
31+
str(tmpdir / "prompts"),
32+
"--input-path",
33+
"tests/test_data/first_problem.jsonl",
34+
]
35+
print(" ".join(cmd))
36+
subprocess.run(cmd, check=True)
37+
# this doesn't currently do anything because
38+
# gpt-4o is hardcoded as model
39+
cmd = [
40+
"python",
41+
"eval/scripts/test_generated_code.py",
42+
]

0 commit comments

Comments
 (0)