New issue 702: "import file mismatch" despite different names (only Windows 7?)
https://bitbucket.org/pytest-dev/pytest/issue/702/import-file-mismatch-despite-different

punch_card:

I have published a full description of the problem at 
[StackOverflow](http://stackoverflow.com/questions/29074967/py-test-import-file-mismatch-despite-different-names-only-windows),
 but here follows a terse summary.

I have tried to device a simple set of black box tests, following the directory 
structure and naming recommendations. When I try to run all tests from the top 
of the structure, I consistently get error messages of this kind:
 
ERROR collecting /prgm_A/test/test_A.py   
import file mismatch:   
imported module 'test_A' has this __file__ attribute:   
  X:\prgm_A\test\test_A.py   
which is not the same as the test file we want to collect:   
  X:\\prgm_A\test\test_A.py   
HINT: remove \_\_pycache\_\_ / ...   

My workaround, to step down into the individual test directories for each 
subprogram and run the subsets of tests from there, stopped working when our 
computers were migrated to 7. 

I don't see this happen under linux.

Note that the page at StackOverflow includes a minimal code example which 
reproduces this problem.


_______________________________________________
pytest-commit mailing list
pytest-commit@python.org
https://mail.python.org/mailman/listinfo/pytest-commit

Reply via email to