-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pyargs with subpackage breaks fixture (conftest.py?) discovery #2985
Comments
I cannot reproduce this on OS X Yosemite Python 2.7.10 nor on Python3 on linux (neither have a |
In virtualenvs that have a However, when converting the pyargs a call is made to |
Using |
we no longer support 2.6 if you like you can propose a pr for inclusion in the next feature/bugfix release |
I can confirm (I installed the development version of pytest with #3010 merged) fixes this issue, so it can be closed. |
Create a python package named foo with folder structure
foo/bar/
withfoo/bar
containing aconftest.py
andtest_foo.py
wheretest_foo.py
uses a fixture fromconftest.py
. Now install this package and use--pyargs hci.bar
to run the tests. This fails because the fixture is not picked up, and from looking at the logs it seems it is because it thinksconftest.py
path includes.../local/...
whereas the test path does not include that (those locations inside virtualenvs are symlinked?). I used the followingtox.ini
to debug:This is on pytest 3.2.3, python 2.7.12, Ubuntu 16.04.
Why did I think this might be the issue? I compared the logs (in particular, fail1 to success1) I noticed the difference here of the path in
plugin: <module 'foo.bar.conftest' from '<...>/.tox/venv/local/lib/python2.7/site-packages/foo/bar/conftest.py'>
and a few others, however my diagnosis might be way off!I'd be happy to investigate myself if someone has got some pointers of where to start looking.
The text was updated successfully, but these errors were encountered: