File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,11 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
148148 invgrep -R --exclude=* .pyc --exclude=testing.py --exclude=test_util.py assert_raises_regex pandas
149149 RET=$(( $RET + $? )) ; echo $MSG " DONE"
150150
151+ # Check for the following code in testing: `unittest.mock`, `mock.Mock()` or `mock.patch`
152+ MSG=' Check that unittest.mock is not used (pytest builtin monkeypatch fixture should be used instread)' ; echo $MSG
153+ invgrep -r -E --include ' *.py' ' (unittest(\.| import )mock|mock\.Mock\(\)|mock\.patch)' pandas/tests/
154+ RET=$(( $RET + $? )) ; echo $MSG " DONE"
155+
151156 # Check that we use pytest.raises only as a context manager
152157 #
153158 # For any flake8-compliant code, the only way this regex gets
You can’t perform that action at this time.
0 commit comments