Document absoluteness of sys.executable

Closes #13402.
This commit is contained in:
Petri Lehtinen 2012-02-02 20:59:48 +02:00
parent 03c29f90c3
commit 9713321f46
4 changed files with 10 additions and 3 deletions

View file

@ -532,6 +532,9 @@ class SysModuleTest(unittest.TestCase):
self.assertEqual(out, b'?')
def test_executable(self):
# sys.executable should be absolute
self.assertEqual(os.path.abspath(sys.executable), sys.executable)
# Issue #7774: Ensure that sys.executable is an empty string if argv[0]
# has been set to an non existent program name and Python is unable to
# retrieve the real program name