Skip to content

Commit 833d975

Browse files
committed
Ensure each test file is checked on its own.
Otherwise could miss a silent failure (validation code not spotted in one file in a folder when other files were OK).
1 parent 4803527 commit 833d975

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

tests/run_tests.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ for code in RST??? ; do
88
echo "======"
99
echo $code
1010
echo "======"
11-
flake8 --select RST $code/ 2>&1 | grep $code
12-
echo "Return code $? from $code tests"
11+
for file in $code/*.py ; do
12+
echo "flake8 --select RST $file"
13+
flake8 --select RST $file 2>&1 | grep $code
14+
done
15+
echo "Good, $code violations reported, as expected."
1316
done
1417
# echo "Positive tests passed (RST errors reported as expected)."
1518

@@ -19,8 +22,9 @@ set -o pipefail
1922
echo "========="
2023
echo "Negatives"
2124
echo "========="
25+
echo "flake8 --select RST test_cases/"
2226
flake8 --select RST test_cases/
23-
#echo "Negative tests passed (no RST errors reported as expected)."
27+
echo "Good, no RST style violations reported, as expected."
2428

2529
echo "============"
2630
echo "Tests passed"

0 commit comments

Comments
 (0)