summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2012-02-02 19:11:28 (GMT)
committerPetri Lehtinen <petri@digip.org>2012-02-02 19:26:05 (GMT)
commitfe6f9d0edc8dc6dd7e51317c8f9788fdd5eeff50 (patch)
treeab9ae6a1fce7d295b49b10530ba81cd2494a694c /Lib/test
parentda6db4f8b0fd3de3a5adc6b8f856e80bfda0d40a (diff)
downloadcpython-fe6f9d0edc8dc6dd7e51317c8f9788fdd5eeff50.zip
cpython-fe6f9d0edc8dc6dd7e51317c8f9788fdd5eeff50.tar.gz
cpython-fe6f9d0edc8dc6dd7e51317c8f9788fdd5eeff50.tar.bz2
Document absoluteness of sys.executable
Closes #13402.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_sys.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index 6c5fc24..6e37ac4 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -471,6 +471,9 @@ class SysModuleTest(unittest.TestCase):
self.assertRaises(TypeError, sys.call_tracing, str, 2)
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