[bug] ensurepath causes index errors if the path is empty
jmrgibson opened this issue · comments
jmrgibson commented
I'm trying to embed pytest in an application binary (eg pyoxidize) indygreg/PyOxidizer#69
In this case, I explicitly don't want to load any python modules from the file system (aside from when pytest collects tests) so sys.path
is empty, which means this line https://github.com/pytest-dev/py/blob/master/py/_path/local.py#L643 causes an index error. Easily resolved by changing the line to if not sys.path or sys.path[0] != s
Would you like me to make a PR to change this?
Ronny Pfannschmidt commented
modern pytest should no longer be using that,
for this lib - maintenance only, its here to die