Skip to content

Commit 90681af

Browse files
committed
STY: Check for pytest.raises without context
xref gh-24332
1 parent d404460 commit 90681af

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
@@ -120,6 +120,10 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
120120
invgrep -r -E --include '*.py' 'pytest\.warns' pandas/tests/
121121
RET=$(($RET + $?)) ; echo $MSG "DONE"
122122

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

0 commit comments

Comments
 (0)