-
Notifications
You must be signed in to change notification settings - Fork 4
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
Directives should only be specified inline #127
Comments
A much weaker position would be allow it but stop advertising it at the top of |
Sounds good! Do you have any thoughts on eventually phasing out that capability? |
Have not really thought about it yet. As a general rule, fewer knobs is good: add them once support them forever. But to add a data point: I think Python doctest does allow specifying directives globally. No idea how much this is used in practice. |
While we're thinking about this project again, should we at least take the "weaker position" mentioned above? |
Just out of curiosity - have you ever found a use case for this functionality? |
No, not in practice. I guess theoretically the WHITESPACE one could be used in this way: I figured projects might have project-wide preferences about these things... |
That's true. I feel that it is desirable that I think doctest could load the closest How about we (1) deprecate and subsequently remove support for specifying directives at the command level in the next major version, and (2) accept patches for adding project-global support for modifying directives (using e.g. a |
I was thinking that perhaps we should not allow to pass directives as part of the
doctest
call. Instead, all directives should be specified inline (as comments in the actual doctests). My rationale is that doctests should be self-documenting and self-contained: it should always be possible to calldoctest <function>
.Let me know what you think; I'm happy to provide a PR.
The text was updated successfully, but these errors were encountered: