From 66d84093cd06525a50f38b7d183aecd3d22963e3 Mon Sep 17 00:00:00 2001 From: Martin Winkel Date: Mon, 20 Apr 2020 02:45:26 +0200 Subject: [PATCH] added CI checks to avoid direct imports from conftest --- ci/code_checks.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 45b7db74fa409..427be459d9edc 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -150,7 +150,13 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then # Check for imports from pandas._testing instead of `import pandas._testing as tm` invgrep -R --include="*.py*" -E "from pandas._testing import" pandas/tests RET=$(($RET + $?)) ; echo $MSG "DONE" - invgrep -R --include="*.py*" -E "from pandas.util import testing as tm" pandas/tests + invgrep -R --include="*.py*" -E "from pandas import _testing as tm" pandas/tests + RET=$(($RET + $?)) ; echo $MSG "DONE" + + # No direct imports from conftest + invgrep -R --include="*.py*" -E "conftest import" pandas/tests + RET=$(($RET + $?)) ; echo $MSG "DONE" + invgrep -R --include="*.py*" -E "import conftest" pandas/tests RET=$(($RET + $?)) ; echo $MSG "DONE" MSG='Check for use of exec' ; echo $MSG