-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4828 from pypy/branch/issue4003
Init sys.executable from GetModuleFileName on win32
- Loading branch information
Showing
3 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# spaceconfig = {"usemodules":["sys"]} | ||
|
||
def test_pypy_find_executable(): | ||
# issue #4003 | ||
import sys | ||
|
||
executable = sys.pypy_find_executable('*') | ||
if sys.platform == 'win32': | ||
assert executable.endswith('.exe') | ||
|
||
fake_executable = r'C:\Windows\System32\cmd.exe' # should exist always | ||
assert executable == sys.pypy_find_executable(fake_executable) | ||
else: | ||
assert executable == '' |