-
Notifications
You must be signed in to change notification settings - Fork 37
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
Cannot build documentation with code marked using multiple directives #219
Comments
A workaround that might work is to use this instead wherever you define your pytest options:
Looking at NASA-Planetary-Science/sbpy#383 , maybe you should just add scipy as required dependency? |
I would have said that the order matters, but you noticed that, too. Maybe this is just a documentation issue? |
Thanks, that work around does get the docs to compile. scipy is not the main issue, but astroquery. I'd like to mark individual code-blocks with |
Oh, you mean the remote-data and requires are also order sensitive? |
Yes. I did not do a formal test with remote-data as I did with requires above, but the crash happens regardless of the order:
vs.
|
Isn't it because each directive is its own block, so nesting doesn't work unless you indent the nested one? Not sure how directives are added, but a single |
I'm confused because some combination does work together while others do not. But I haven't really had a chance to dive into the details. |
We now run into the issue of needing (I mean, fixing #146 is probably the easiest workaround) |
[Edit by @bsipocz]: This seems to be a generic issue, not just with the specific directives below. Most recently we run into the issue with using
doctest-remote-data::
along withplot::
When I mark a code block with multiple directives including
doctest-requires
Sphinx cannot build the documentation. For example:Causes the following exception:
The log file referenced above is:
sphinx-err-yi3p0x_g.log
The order does matter. The following block builds OK:
I've forked this repo and added a test file that shows this behavior: https://github.com/mkelley/pytest-doctestplus/tree/multiple-directives
Packages used in the failing test:
The text was updated successfully, but these errors were encountered: