Skip to content

Commit

Permalink
STY: Check for pytest.raises without context
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyoung committed Mar 25, 2019
1 parent 9821b77 commit 3d66f1c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
invgrep -r -E --include '*.py' 'pytest\.warns' pandas/tests/
RET=$(($RET + $?)) ; echo $MSG "DONE"

MSG='Check for pytest raises without context' ; echo $MSG
invgrep -r -E --include "[[:space:]] pytest.raises" pandas/tests/
RET=$(($RET + $?)) ; echo $MSG "DONE"

# Check for the following code in testing: `np.testing` and `np.array_equal`
MSG='Check for invalid testing' ; echo $MSG
invgrep -r -E --include '*.py' --exclude testing.py '(numpy|np)(\.testing|\.array_equal)' pandas/tests/
Expand Down

0 comments on commit 3d66f1c

Please sign in to comment.