Using py.test, two tests called the same in different directory causes py.test to fail. Why is that? How can I change this without renaming all the tests? To duplicate do: Answer Putting an __init__.py is one way of resolving the conflict. Unlike nose, current pytest does not try to unload test modules in order to import test modules with the