We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 216986d commit f88ebd2Copy full SHA for f88ebd2
ci/code_checks.sh
@@ -151,6 +151,14 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
151
MSG='Check that no file in the repo contains tailing whitespaces' ; echo $MSG
152
invgrep --exclude="*.svg" -RI "\s$" *
153
RET=$(($RET + $?)) ; echo $MSG "DONE"
154
+
155
+ # Check that we use pytest.raises only as a context manager
156
+ #
157
+ # For any flake8-compliant code, the only way this regex gets
158
+ # matched is if there is no "with" statement preceding "pytest.raises"
159
+ MSG='Check for pytest.raises as context manager' ; echo $MSG
160
+ invgrep -R --include '*.py' -E '[[:space:]] pytest.raises' pandas/tests
161
+ RET=$(($RET + $?)) ; echo $MSG "DONE"
162
fi
163
164
### CODE ###
0 commit comments