pytest fails to import `testing/_sourcetests/conftest.py` when running without usedevelop

Summary

When running the test suite with tox -e <py>-nocover, pytest will get confused with the two different conftest.py variants that end up in its path and blow up.

Steps to reproduce

  1. Run tox -e <py>-nocover
  2. ???
  3. No, seriously, ???

What is the current bug behavior?

Pytest blows up.

What is the expected correct behavior?

Pytest should test my terrible code and tell me what's wrong with it.

Relevant logs and/or screenshots

https://hastebin.com/ujubacozes.cs

Possible fixes

This seems to be related to not setting usedevelop in the tox config - @juergbi and I doubt that we want usedevelop to be disabled for nocover, so simply disabling that might solve the problem. It'd be nice to figure out why this happens though.


Edited by Chandan Singh