pytest-el icon indicating copy to clipboard operation
pytest-el copied to clipboard

Enable relative test paths by setting optional source root directory

Open billiams opened this issue 3 years ago • 0 comments

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.

billiams avatar Jun 30 '22 17:06 billiams