summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2012-02-02 18:59:48 (GMT)
committerPetri Lehtinen <petri@digip.org>2012-02-02 18:59:50 (GMT)
commit9713321f46769f41f653a752ec348cec766e633e (patch)
tree657778bca14237ae70d61ad4e54fdc3497acb761 /Lib
parent03c29f90c37870d3a0a65524373acb5008fa7a11 (diff)
downloadcpython-9713321f46769f41f653a752ec348cec766e633e.zip
cpython-9713321f46769f41f653a752ec348cec766e633e.tar.gz
cpython-9713321f46769f41f653a752ec348cec766e633e.tar.bz2
Document absoluteness of sys.executable
Closes #13402.
Diffstat (limited to 'Lib')
-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 db27cdf..5d3404f 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -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