Skip doctest collection for subpackages depending on available dependencies#10358
Skip doctest collection for subpackages depending on available dependencies#10358pllim merged 4 commits intoastropy:masterfrom
Conversation
|
Ok so that fails nicely. Now pushing the skipping configuration! |
|
Ok so let's see if that works. Note to self that I should find a way to avoid the following warning during collection though: Should be an easy fix. |
|
It works! |
setup.cfg
Outdated
| doctest_norecursedirs = | ||
| */setup_package.py | ||
| doctest_subpackage_requires = | ||
| astropy/io/misc/asdf/*=asdf |
There was a problem hiding this comment.
Spaces around = is even more consistent! 😉
| astropy/io/misc/asdf/*=asdf | |
| astropy/io/misc/asdf/* = asdf |
Good point, I'll add a job to the Travis matrix with minimal dependencies, in the initial stage of testing |
|
@pllim - to test this more, I've also (for now) reverted some of the changes in #10257 since we can now more easily skip the doctest collection, and I think the current structure is more convoluted with checks and exceptions all the time. I think it's reasonable to expect that importing astropy.io.misc.yaml should fail if PyYAML is not installed. |
|
(still experimental btw, do not merge!) |
|
Re: |
…octests in astropy.io.misc.asdf if asdf is not installed
bf32ba8 to
8f7aa99
Compare
…skip doctest collection in astropy.io.misc.yaml if PyYAML is not available.
8f7aa99 to
7ee1760
Compare
|
Belated 👍 to this change - very nice to have the |
Skip doctest collection for subpackages depending on available dependencies
Skip doctest collection for subpackages depending on available dependencies
This is an experiment to try out the proposed fix for scientific-python/pytest-doctestplus#112 which allows doctest collection to be skipped per subpackage based on requirements.
The first commit's CI should fail before I actually define any options in
setup.cfg(this is a deliberate test). Once I've checked that it fails, I'll push the fixes.