File tree Expand file tree Collapse file tree 2 files changed +6
-21
lines changed Expand file tree Collapse file tree 2 files changed +6
-21
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- echo " Running all test cases across the project with coverage analysis ..."
2
+ echo " Running all test cases across the project..."
3
3
4
4
# Initialize a failure counter
5
5
failure_count=0
@@ -10,21 +10,10 @@ excluded_dirs="document_classifier functional_tests"
10
10
# Find all test files except those in excluded directories
11
11
test_files=$( find . -type f -name " test_*.py" | grep -Ev " $( echo $excluded_dirs | sed ' s/ /|/g' ) " )
12
12
13
- # Begin coverage tracking
14
- coverage erase # Clear any existing coverage data
15
-
16
- # Setup .coveragerc configuration to include all Python files
17
- echo " [run]
18
- source = .
19
- include = */*.py
20
-
21
- [report]
22
- show_missing = True" > .coveragerc
23
-
24
- # Run each test file with coverage (without generating report yet)
13
+ # Run each test file
25
14
for test_file in $test_files ; do
26
15
echo " Running $test_file ..."
27
- coverage run --append -m pytest " $test_file " # Collect coverage data
16
+ pytest " $test_file "
28
17
29
18
# Check the exit status of pytest
30
19
if [ $? -ne 0 ]; then
@@ -33,11 +22,10 @@ for test_file in $test_files; do
33
22
fi
34
23
done
35
24
36
- # Report the results without generating the coverage report
25
+ # Report the results
37
26
if [ $failure_count -ne 0 ]; then
38
- echo " $failure_count test(s) failed. Refer to the terminal output for details. "
27
+ echo " $failure_count test(s) failed."
39
28
exit 1
40
29
else
41
30
echo " All tests passed successfully!"
42
- echo " Coverage data collected. Coverage report will be generated separately."
43
- fi
31
+ fi
You can’t perform that action at this time.
0 commit comments