Skip to content

Commit

Permalink
fix: fix pytest process
Browse files Browse the repository at this point in the history
  • Loading branch information
terryyz committed May 9, 2024
1 parent 02dab46 commit 9382184
Showing 1 changed file with 18 additions and 21 deletions.
39 changes: 18 additions & 21 deletions script/run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NAMES=(chien jenny wenhao niklas hanhu ratna simon ming zhihan james xiaoheng armel)

rm -rf data/clean/*
for name in "${NAMES[@]}"; do
# Copy all files for other names
cp data/raw/*"$name"*py data/clean/
Expand All @@ -14,25 +14,22 @@ gzip -c data/wild-code-bench.jsonl > data/wild-code-bench.jsonl.gz
# pip install -U wild-code
# python script/eval.py --samples data/wild-code-bench.jsonl

for name in "${NAMES[@]}"; do

for file in data/processed/*wo_doc.py; do

if ! pytest "$file"; then
echo "Pytest failed on $file, stopping..."
exit 1
fi
done
for file in data/processed/*wo_doc.py; do

if ! pytest "$file"; then
echo "Pytest failed on $file, stopping..."
exit 1
fi
done

for file in data/processed/*w_doc.py; do
if [[ "$file" == *"189_"* ]]; then
continue
fi
for file in data/processed/*w_doc.py; do

if [[ "$file" == *"189_"* ]]; then
continue
fi

if ! pytest --doctest-modules "$file"; then
echo "Pytest failed on $file, stopping..."
exit 1
fi
done
done
if ! pytest --doctest-modules "$file"; then
echo "Pytest failed on $file, stopping..."
exit 1
fi
done

0 comments on commit 9382184

Please sign in to comment.