File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,15 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
148
148
invgrep -R --exclude=* .pyc --exclude=testing.py --exclude=test_testing.py assert_raises_regex pandas
149
149
RET=$(( $RET + $? )) ; echo $MSG " DONE"
150
150
151
+ # Check that we use pytest.raises only as a context manager
152
+ #
153
+ # For any flake8-compliant code, the only way this regex gets
154
+ # matched is if there is no "with" statement preceding "pytest.raises"
155
+ MSG=' Check for pytest.raises as context manager (a line starting with `pytest.raises` is invalid, needs a `with` to precede it)' ; echo $MSG
156
+ MSG=' TODO: This check is currently skipped because so many files fail this. Please enable when all are corrected (xref gh-24332)' ; echo $MSG
157
+ # invgrep -R --include '*.py' -E '[[:space:]] pytest.raises' pandas/tests
158
+ # RET=$(($RET + $?)) ; echo $MSG "DONE"
159
+
151
160
MSG=' Check that no file in the repo contains tailing whitespaces' ; echo $MSG
152
161
invgrep --exclude=" *.svg" -RI " \s$" *
153
162
RET=$(( $RET + $? )) ; echo $MSG " DONE"
You can’t perform that action at this time.
0 commit comments