-
Notifications
You must be signed in to change notification settings - Fork 170
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] Only skip tests for non-installed packages on local machine #698
Conversation
🤔 not sure why flake8 only passes on CI Windows and my Windows... Disagree with the |
In hindsight, it actually might be worth scrapping the custom if running_on_ci():
import pyspark
else:
pyspark = importorskip("pyspark") More code in your face, but everything is more obvious. |
Codecov Report
@@ Coverage Diff @@
## dev #698 +/- ##
=======================================
Coverage 93.16% 93.16%
=======================================
Files 16 16
Lines 600 600
=======================================
Hits 559 559
Misses 41 41 |
OK @hectormz! I fixed the issue about conditional imports, and submitted two corrective feedback pieces to deepsource that they a conditional import should be allowed. Anybody else wanna do the honors of hittin' the button? 😸 |
@ericmjl got it! I meant to check out if pyspark is actually used when imported. It might just be verifying that it is installed at that point |
Nevermind! I'm fine with current state, unless someone else reviews and finds a problem |
OK, I'm gonna hit merge, two days have passed. |
🎉 |
PR Description
Please describe the changes proposed in the pull request:
importorskip
(borrowed from Skip tests for optional/extra dependencies when not installed arviz-devs/arviz#1113) to prevent skips on CI machinepytest.mark.skipif
wrapper on pyspark fixtures, which seems to be not needed (?)This PR resolves #115.
PR Checklist
Please ensure that you have done the following:
<your_username>
:dev
, but rather from<your_username>
:<feature-branch_name>
.AUTHORS.rst
.CHANGELOG.rst
under the latest version header (i.e. the one that is "on deck") describing the contribution.Quick Check
To do a very quick check that everything is correct, follow these steps below:
make check
from pyjanitor's top-level directory. This will automatically run:Once done, please check off the check-box above.
If
make check
does not work for you, you can execute the commands listed in the Makefile individually.Code Changes
If you are adding code changes, please ensure the following:
$ pytest .
) locally on your machine.Relevant Reviewers
Please tag maintainers to review.