test_executable in Lib/test/test_sys.py tests that sys.executable is absolute. But this test is too strong, it fails if sys.executable is not normalized.
$ Lib/../python -m test test_sys
Run tests sequentially
0:00:00 load avg: 0.39 [1/1] test_sys
test test_sys failed -- Traceback (most recent call last):
File "/home/serhiy/py/cpython/Lib/test/test_sys.py", line 649, in test_executable
self.assertEqual(os.path.abspath(sys.executable), sys.executable)
AssertionError: '/home/serhiy/py/cpython/python' != '/home/serhiy/py/cpython/Lib/../python'
- /home/serhiy/py/cpython/python
+ /home/serhiy/py/cpython/Lib/../python
? +++++++
test_sys failed
1 test failed:
test_sys
Total duration: 2 sec
Tests result: FAILURE
I don't know what is wrong: the value of sys.executable or the test. |