drop python.exe extension on windows on shebang

This commit is contained in:
Celeborn2BeAlive 2020-09-09 09:32:44 +02:00 committed by Anthony Sottile
parent 8e9f927e3d
commit 273326b89b
2 changed files with 7 additions and 2 deletions

View file

@ -56,8 +56,13 @@ def patch_sys_exe(exe):
def test_shebang_windows():
with patch_platform('win32'), patch_sys_exe('python'):
assert shebang() == '#!/usr/bin/env python'
def test_shebang_windows_drop_ext():
with patch_platform('win32'), patch_sys_exe('python.exe'):
assert shebang() == '#!/usr/bin/env python.exe'
assert shebang() == '#!/usr/bin/env python'
def test_shebang_posix_not_on_path():