Skip to content

Commit 348a207

Browse files
author
Your Name
committed
Modifications2
1 parent 168eccc commit 348a207

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

init.sh

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
1-
2-
!/bin/bash
1+
#!/bin/bash
32
echo "Running all test cases across the project..."
43

4+
# Initialize a failure counter
5+
failure_count=0
6+
57
# Find and run all Python files starting with 'test_' in the entire project directory
68
for test_file in $(find . -type f -name "test_*.py"); do
79
echo "Running $test_file..."
810
pytest "$test_file"
11+
12+
# Check the exit status of pytest
13+
if [ $? -ne 0 ]; then
14+
echo "Test failed: $test_file"
15+
failure_count=$((failure_count + 1))
16+
fi
917
done
1018

11-
echo "All tests completed!"
19+
# Report the results
20+
if [ $failure_count -ne 0 ]; then
21+
echo "$failure_count test(s) failed."
22+
exit 1
23+
else
24+
echo "All tests passed successfully!"
25+
fi

requirements/local.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ pytest==8.0.0 # https://github.com/pytest-dev/pytest
1313
pytest-sugar==1.0.0 # https://github.com/Frozenball/pytest-sugar
1414
types-requests # maybe instead, we should add `mypy --install-types` to the dockerfile?
1515
types-xmltodict
16+
numpy
17+
pandas
18+
torch
19+
transformers
1620

1721
# Documentation
1822
# ------------------------------------------------------------------------------

0 commit comments

Comments
 (0)