Skip to content

Commit 5b8576f

Browse files
author
Your Name
committed
Separation of coverage Report_latest
1 parent 34ce092 commit 5b8576f

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

generate_coverage_report.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

init.sh

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
echo "Running all test cases across the project with coverage analysis..."
2+
echo "Running all test cases across the project..."
33

44
# Initialize a failure counter
55
failure_count=0
@@ -10,21 +10,10 @@ excluded_dirs="document_classifier functional_tests"
1010
# Find all test files except those in excluded directories
1111
test_files=$(find . -type f -name "test_*.py" | grep -Ev "$(echo $excluded_dirs | sed 's/ /|/g')")
1212

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
2514
for test_file in $test_files; do
2615
echo "Running $test_file..."
27-
coverage run --append -m pytest "$test_file" # Collect coverage data
16+
pytest "$test_file"
2817

2918
# Check the exit status of pytest
3019
if [ $? -ne 0 ]; then
@@ -33,11 +22,10 @@ for test_file in $test_files; do
3322
fi
3423
done
3524

36-
# Report the results without generating the coverage report
25+
# Report the results
3726
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."
3928
exit 1
4029
else
4130
echo "All tests passed successfully!"
42-
echo "Coverage data collected. Coverage report will be generated separately."
43-
fi
31+
fi

0 commit comments

Comments
 (0)