[Pytest-commit] Issue #539: `py.test --doctest-modules` fails if `python setup.py buld` has been run. (hpk42/pytest)

Tom Prince issues-reply at bitbucket.org
Sun Jul 13 07:11:00 CEST 2014


New issue 539: `py.test --doctest-modules` fails if `python setup.py buld` has been run.
https://bitbucket.org/hpk42/pytest/issue/539/pytest-doctest-modules-fails-if-python

Tom Prince:

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:
```
________________________________________________________ ERROR collecting service_identity/_common.py _________________________________________________________
../../dev/tmp-111d346bc44a488b/lib/python2.7/site-packages/py/_path/local.py:639: in pyimport
>               raise self.ImportMismatchError(modname, modfile, self)
E               ImportMismatchError: ('service_identity._common', '/Users/cougar/src/service_identity/build/lib/service_identity/_common.py', local('/Users/cougar/src/service_identity/service_identity/_common.py'))
```




More information about the pytest-commit mailing list