[Pytest-commit] Issue #673: wrong conftest's fixtures being used? (hpk42/pytest)

inklesspen issues-reply at bitbucket.org
Thu Feb 5 22:52:50 CET 2015


New issue 673: wrong conftest's fixtures being used?
https://bitbucket.org/hpk42/pytest/issue/673/wrong-conftests-fixtures-being-used

inklesspen:

I've got a fun issue that I believe goes back to sys.path and importable packages, but basically:

I have two libraries in the same repo. each library has its own test directory, with a conftest.py. Each conftest provides some fixtures with the same name; that is, libA's conftest.py and libB's conftest.py both provide a pyramid_app fixture.

This worked fine for a while until libB's test directory got an __init__.py and became a package. Now, libA is getting libB's fixtures instead of its own. That is, libA's test asks for a fixture provided by libA's conftest.py, but it's getting the fixture of the same name from libB's conftest.py

Is this something that _should_ work, barring pythonpath issues? or are fixtures supposed to be uniquely named?

If it's supposed to work, then I've got a smallish test case that reproduces my problem.




More information about the pytest-commit mailing list