You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The option is named --doctest-modules (plural). This used to work prior 5.0 because ArgumentParser contains a feature that accepts "partial options", that's why --doctest-module used to work. We have disabled "partial options" because it brings a number of problems.
This is mentioned in more details on the CHANGELOG:
#1149: Pytest no longer accepts prefixes of command-line arguments, for example typing pytest --doctest-mod inplace of --doctest-modules. This was previously allowed where the ArgumentParser thought it was unambiguous, but this could be incorrect due to delayed parsing of options for plugins. See for example issues #1149, #3413, and #4009.
I'm closing for now, feel free to follow up with other questions. 👍
pip list
from the virtual environment you are usingUsing:
Since v5.0.0, I'm getting
unrecognized arguments: --doctest-module
.pytest
section of mysetup.cfg
:The v5 changelog does mention something about
--doctest-module
but it does not offer any explanation why my case would fail... Also, I'm still following the setup recommended in https://docs.pytest.org/en/latest/doctest.htmlThe text was updated successfully, but these errors were encountered: