Skip to content

Commit 9382184

Browse files
committed
fix: fix pytest process
1 parent 02dab46 commit 9382184

File tree

1 file changed

+18
-21
lines changed

1 file changed

+18
-21
lines changed

script/run.sh

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NAMES=(chien jenny wenhao niklas hanhu ratna simon ming zhihan james xiaoheng armel)
2-
2+
rm -rf data/clean/*
33
for name in "${NAMES[@]}"; do
44
# Copy all files for other names
55
cp data/raw/*"$name"*py data/clean/
@@ -14,25 +14,22 @@ gzip -c data/wild-code-bench.jsonl > data/wild-code-bench.jsonl.gz
1414
# pip install -U wild-code
1515
# python script/eval.py --samples data/wild-code-bench.jsonl
1616

17-
for name in "${NAMES[@]}"; do
18-
19-
for file in data/processed/*wo_doc.py; do
20-
21-
if ! pytest "$file"; then
22-
echo "Pytest failed on $file, stopping..."
23-
exit 1
24-
fi
25-
done
17+
for file in data/processed/*wo_doc.py; do
18+
19+
if ! pytest "$file"; then
20+
echo "Pytest failed on $file, stopping..."
21+
exit 1
22+
fi
23+
done
2624

27-
for file in data/processed/*w_doc.py; do
28-
29-
if [[ "$file" == *"189_"* ]]; then
30-
continue
31-
fi
25+
for file in data/processed/*w_doc.py; do
26+
27+
if [[ "$file" == *"189_"* ]]; then
28+
continue
29+
fi
3230

33-
if ! pytest --doctest-modules "$file"; then
34-
echo "Pytest failed on $file, stopping..."
35-
exit 1
36-
fi
37-
done
38-
done
31+
if ! pytest --doctest-modules "$file"; then
32+
echo "Pytest failed on $file, stopping..."
33+
exit 1
34+
fi
35+
done

0 commit comments

Comments
 (0)