kvas-it / pytest-console-scripts

Pytest plugin for testing console scripts
MIT License
78 stars 14 forks source link

Locate the Python interpreter through sys.executable #47

Closed AluisioASG closed 3 years ago

AluisioASG commented 3 years ago

While packaging for NixOS, I've found that running non-executable scripts depends on there being a python executable in the $PATH, which may not exist (aside from NixOS, Debian doesn't seem to have it by default either).

Instead, try to use the same executable as the current interpreter, and only if that is unknown do fallback to python.

kvas-it commented 3 years ago

Thank you, @AluisioASG. Would you like me to make a release with your change?

AluisioASG commented 3 years ago

That'd be nice, since I'm already pulling another commit made after 1.1.0, but it's really up to you.

kvas-it commented 3 years ago

Done: https://pypi.org/project/pytest-console-scripts/1.2.0/

AluisioASG commented 3 years ago

Perfect, thank you!