Windows and Cygwin __pycache__ entries conflict
pyhedgehog opened this issue · comments
PyHedgehog commented
Copy from pytest-dev/pytest#2278:
If I want to check same version of windows and cygwin flavour of python one that's tested later always fail.
Removing of __pycache__
directories helps.
Error is like this:
# python -m pytest tests/test_cli.py
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/_pytest/config.py", line 362, in _importconftest
mod = conftestpath.pyimport()
File "/usr/lib/python2.7/site-packages/py/_path/local.py", line 680, in pyimport
raise self.ImportMismatchError(modname, modfile, self)
ImportMismatchError: ('conftest', 'C:\\src\\project\\tests\\conftest.py', local('/src/github/project/tests/conftest.py'))
ERROR: could not load /src/project/tests/conftest.py
Ronny Pfannschmidt commented
i beleive pyimport is unrelated to this, i believe this is a problem with the pytest assertion rewriter - its potentially a bug in the cygwin python build after all it should have different abi tags for the pyc files
Ronny Pfannschmidt commented
closing here since pylib cant solve it, pyimport does just figure a module name