-
Notifications
You must be signed in to change notification settings - Fork 12
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
Configurable doctest modules/paths #167
Comments
I generally support this. There is some I think the "-m / --module" argument could be expanded to accept multiple paths to modules to test. That might be the most straightforward way of doing it. I waffle about if the entire "first argument is a command or a path" is good design or not. It is convenient, but it has made implementation messy. Multiple positional arguments can likely also be interpreted as multiple files to test. I think much of this can be done already if xdoctest is used as a pytest plugin, but on its own it does lack these features. Any implementation should be careful such that a configuration of xdoctest via |
Agreed. I actually attempted to get the pytest plugin working but to no avail. I may have too many plugins set up at the moment. Still, having a single source of default config would make this much more usable by multiple developers without requiring setup with something akin to |
@NellyWhads are you interested in working on an implementation? I don't have any cycles for new features at the moment. |
Sure, if you don't mind pointing me to the modules where you'd prefer to see this slotted in, I can perhaps take a stab over the winter break |
There are a few files of interest:
The main entrypoint is The The other place to be aware of is in |
Reading through docs and usage examples and trying various things myself, I believe there's a usage gap that can be addressed.
As a user of
xdoctest
in a complex project which include multiple sub-modules, the following questions come to mind:xdoctest
to run with a single command?xdoctest
with a default configuration for a project?xdoctest
pytest plugin?Proposal:
xdoctest
on multiple modules at a time.args
option (which after 1., can accept multiple module paths)pyproject.toml
file undertool.xdoctest
This would mimic the behavior of popular tools such as
Coverage.py
, which allows collecting coverage from specific locations as opposed to only one root module, all configurable through a singletool.coverage
section in thepyproject.toml
.The text was updated successfully, but these errors were encountered: