Skip to content
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

Add decorators to potentially skip tests that require optional dependencies #167

Closed
spencerkclark opened this issue Mar 30, 2017 · 5 comments
Labels
Milestone

Comments

@spencerkclark
Copy link
Collaborator

Currently we have tests which require:

  • multiprocess

And if we add tests of the notebook they will also require:

  • matplotlib
  • runipy or pytest-ipynb

None of these are required dependencies for aospy, so we should only run those tests if those libraries are present on someone's system. xarray has some good examples for how to do this in: tests/init.py.

@spencerkclark spencerkclark changed the title Add decorators to skip tests that require optional dependencies Add decorators to potentially skip tests that require optional dependencies Mar 30, 2017
@spencerahill
Copy link
Owner

See #166 (comment)

@spencerkclark if you think I'm on the right track there, then I can add the same logic for multiprocess and matplotlib

@spencerkclark
Copy link
Collaborator Author

It would be great if you could take care of multiprocess (I took care of matplotlib already; the notebook test is the only one that requires it).

Simultaneously could you add a new CI environment, called like environment-py27-min.yml (e.g. xarray's) that includes only our minimum requirements? This will ensure that our import skips are operating as desired.

@spencerahill
Copy link
Owner

Good call, will do.

@spencerahill spencerahill added this to the v0.2 milestone Mar 30, 2017
@spencerahill
Copy link
Owner

C.f. #168, need to catch pytest-catchlog also for test_automate

@spencerahill
Copy link
Owner

After #172, multiprocess is no longer needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants