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
[FeatureRequest] Add --doctest-only to only collect doctests #4726
Comments
based on context i am wondering if we should perhaps move towards making doctestplus the default doctest implementation if memory serves me right, none of the core devs of pytest are deeply involved or happily using doctest |
You mean integrating it into the core? |
@nicoddemus no, taking it out ^^ |
I'm not fussed where it's implemented - I just opened an issue here since pytest already has some doctest functionality and this would be a great enhancement IMHO. I'd be happy to install |
i started a conversation with the relevant maintainers |
Because doctest is implemented as a logically independent plugin, there are two implementation strategies/perspectives for achieving this: In doctest pluginThe doctest plugin adds a Advantages:
Disadvantages:
In python pluginThe python plugin adds a flag to disable its own collection, e.g. Advantages/Disadvantages: basically the opposite of previous one. While I think it made perfect sense for pytest-doctestplus to implement the first solution, I think for pytest the second solution is preferable. |
BTW, reading the pytest-doctestplus code, what they do is ignore all |
When using pytest on CI you often want to test doctests / unittests / intergration tests separately. To enable this usecase it would be good to have a
--doctest-only
flag to enable running only the doctestsThe text was updated successfully, but these errors were encountered: