pytest-el
pytest-el copied to clipboard
Enable relative test paths by setting optional source root directory
Currently, full paths are passed to the pytest command when running a subset of tests, i.e.:
cd /path/to/project/root && pytest /full/path/to/test.py
This prevents the ability to run tests in containers that commonly define different working directories, as the test paths will be different in those containers.
One potential solution to this issue would be to add the ability to set an optional source root directory similar to Pycharm so that test paths are then set relative to the defined source root.