File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed
Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 1-
2- ! /bin/bash
1+ #! /bin/bash
32echo " 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
68for 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
917done
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
Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ pytest==8.0.0 # https://github.com/pytest-dev/pytest
1313pytest-sugar==1.0.0 # https://github.com/Frozenball/pytest-sugar
1414types-requests # maybe instead, we should add `mypy --install-types` to the dockerfile?
1515types-xmltodict
16+ numpy
17+ pandas
18+ torch
19+ transformers
1620
1721# Documentation
1822# ------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments