trbs / pid

Pidfile featuring stale detection and file-locking, can also be used as context-manager or decorator
https://pypi.python.org/pypi/pid/
Apache License 2.0
102 stars 26 forks source link

Do not hardcode "python" and "pytest" in tests #28

Closed vojtechtrefny closed 5 years ago

vojtechtrefny commented 5 years ago

I discovered these issues when packaging pid for Debian. Debian packaging tools run tests during the package build using python3 -m pytest tests which makes the tests fail because the default pidfile name is pytest.py.pid (because "executable" in this case is "pytest.py). Also hardcoding "python" as executable name doesn't work on systems without Python 2 (/usr/bin/python is usually "reserved" for Python 2 so there is no python without Python 2).

trbs commented 5 years ago

Awesome thanks !

Do you need a new release for this or is getting it into master good enough ?

vojtechtrefny commented 5 years ago

Do you need a new release for this or is getting it into master good enough ?

Thanks, I don't need a new release just for this, merging is enough, thanks.