-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: CI checks against direct imports from conftest.py #33664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TST: CI checks against direct imports from conftest.py #33664
Conversation
SaturnFromTitan
commented
Apr 20, 2020
- closes Make a code check which bans imports of fixtures in tests #30914
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just converted this from util.testing
to ._testing
. Seems like this code check wasn't adapted to the new location of the testing module.
It's not related, but as the PR is tiny otherwise, I think it's ok to include it.
RET=$(($RET + $?)) ; echo $MSG "DONE" | ||
|
||
# No direct imports from conftest | ||
invgrep -R --include="*.py*" -E "conftest import" pandas/tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using "conftest import"
instead of "pandas.conftest import"
to make it work for all conftest files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @SaturnFromTitan lgtm.
thanks @SaturnFromTitan |