Closed galund closed 1 year ago
Hah, I figured something had changed since all the CI test jobs suddenly stopped working. I already added this through another PR :) Many, many thanks for the detailed description and all the work you've done on this project.
This PR works around a possible breaking change in recent versions of pip.
The following alternatives were considered:
conftest.py
file intests
. This has a side-effect of ensuring thetests
directory is properly imported as a module. However, while many projects won't have noticed thepip
change because of having a conftest file, relying on this seems obscure.In the end, explicitly configuring the project root to be in the pythonpath when running tests appears to be robust and sensible.
That by default
pytest
does not put the root directory into the pythonpath - unlike when runningpython -m pytest
- is apparently a deliberate design choice / behaviour, albeit one that's very confusing for people not familiar with it.