-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
py.test --doctest-modules
fails if python setup.py build
has been run.
#539
Comments
What's the status on this issue? |
so far it hasn't been changed, one should use the testdirs ini setting instead |
@RonnyPfannschmidt what do I put exactly? I didn't see a [pytest]
addopts=--doctest-modules
testpaths=bin tests examples riko
norecursedirs=lib include .tox |
@reubano, @RonnyPfannschmidt probably meant testpaths. Are you having the same problem, even with the |
Yes, this setup doesn't work. |
@reubano sorry for not getting back to this sooner. Could you please post your full terminal output? |
py.test --doctest-modules
fails if python setup.py buld
has been run.py.test --doctest-modules
fails if python setup.py build
has been run.
This behavior also occurs for xdoctest (my extended doctest plugin). I see the behavior if I run
The behavior is the same with the builtin doctest plugin, so its not just an issue with xdoctest. The reason I tested this way instead of doing an in-source build and testing was because there was an issue that only occurred when my package was installed (running it from the source tree was not a problem). |
@nicoddemus It seems that this link https://pytest.readthedocs.io/en/stable/customize.html?highlight=testpaths#confval-testpaths is broken |
@graingert thanks, updated the link in the original post: https://docs.pytest.org/en/latest/reference.html#confval-testpaths |
Btw, I have just tried the original issue (doctest modules in the I'm closing this issue then, if others have similar problems let's post them here and/or open a new issue if it's a different problem. 👍 |
Originally reported by: Tom Prince (BitBucket: tomprince, GitHub: tomprince)
py.test will recurse into the distutils build directory looking for modules to run doc-tests for, but will try to import them from the root directory, leading to a mismatch between files:
The text was updated successfully, but these errors were encountered: