Fix a couple of tests when no “python” in path - #2399
Conversation
|
On MacOS: This is because I suppose one option would be to assume that just having the correct executable name from Another option would be to map |
These CLI tests assume a “python” executable is available outside of a virtualenv, which is not necessarily true (e.g. Fedora has only “python3” if the `python-unversioned-command` package is not installed). Use the basename from `sys.executable` in the script configs for these tests instead.
d943e65 to
9eeb6f4
Compare
I implemented this for now. Let’s see how it goes. |
These CLI tests assume a “python” executable is available outside of a virtualenv, which is not necessarily true (e.g. Fedora has only “python3” if the
python-unversioned-commandpackage is not installed). Use the value ofsys.executablein the script configs for these tests instead.I found this while working on Hatch 1.18.0 for Fedora because the new test
test_interrupt_signal_not_inheritedfailed; I hadn’t noticed that it already affectedtest_scripts_no_environmentbecause our builds are offline andtest_scripts_no_environmenthas@pytest.mark.requires_internet.