Skip to content

Commit 4840738

Browse files
HusseinYasserexploreriii
authored andcommitted
changed the check to accept only suffix _test.py
Signed-off-by: HusseinYasser <[email protected]>
1 parent 9c54bec commit 4840738

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/scripts/check_test_files.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ function check_test_file_name() {
2929
return 0
3030
fi
3131
done
32-
if [[ $(basename "$filename") != test_* && $(basename "$filename") != *_test.py ]]; then
33-
ERRORS+=("${RED}ERROR${RESET}: Test file '$filename' neither starts with 'test_' nor ends with '_test'. ${YELLOW}It has to follow the pytest naming convention.")
32+
if [[ $(basename "$filename") != *_test.py ]]; then
33+
ERRORS+=("${RED}ERROR${RESET}: Test file '$filename' doesn't end with '_test'. ${YELLOW}It has to follow the pytest naming convention.")
3434
return 1
3535
fi
3636
fi

0 commit comments

Comments
 (0)