Skip to content

Commit cbffba1

Browse files
committed
STY: Check for pytest.raises without context
xref gh-24332
1 parent 9821b77 commit cbffba1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ci/code_checks.sh

+4
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
119119
invgrep -r -E --include '*.py' 'pytest\.warns' pandas/tests/
120120
RET=$(($RET + $?)) ; echo $MSG "DONE"
121121

122+
MSG='Check for pytest raises without context' ; echo $MSG
123+
invgrep -r -E --include '*.py' "[[:space:]] pytest.raises" pandas/tests/
124+
RET=$(($RET + $?)) ; echo $MSG "DONE"
125+
122126
# Check for the following code in testing: `np.testing` and `np.array_equal`
123127
MSG='Check for invalid testing' ; echo $MSG
124128
invgrep -r -E --include '*.py' --exclude testing.py '(numpy|np)(\.testing|\.array_equal)' pandas/tests/

0 commit comments

Comments
 (0)