Skip to content

Commit

Permalink
Modifications2
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Dec 9, 2024
1 parent 168eccc commit 348a207
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
20 changes: 17 additions & 3 deletions init.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@

!/bin/bash
#!/bin/bash
echo "Running all test cases across the project..."

# Initialize a failure counter
failure_count=0

# Find and run all Python files starting with 'test_' in the entire project directory
for test_file in $(find . -type f -name "test_*.py"); do
echo "Running $test_file..."
pytest "$test_file"

# Check the exit status of pytest
if [ $? -ne 0 ]; then
echo "Test failed: $test_file"
failure_count=$((failure_count + 1))
fi
done

echo "All tests completed!"
# Report the results
if [ $failure_count -ne 0 ]; then
echo "$failure_count test(s) failed."
exit 1
else
echo "All tests passed successfully!"
fi
4 changes: 4 additions & 0 deletions requirements/local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ pytest==8.0.0 # https://github.com/pytest-dev/pytest
pytest-sugar==1.0.0 # https://github.com/Frozenball/pytest-sugar
types-requests # maybe instead, we should add `mypy --install-types` to the dockerfile?
types-xmltodict
numpy
pandas
torch
transformers

# Documentation
# ------------------------------------------------------------------------------
Expand Down

0 comments on commit 348a207

Please sign in to comment.