[New-bugs-announce] [issue31030] sys.executable can be not normalized

Serhiy Storchaka report at bugs.python.org
Tue Jul 25 08:41:50 EDT 2017


New submission from Serhiy Storchaka:

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.

----------
components: Interpreter Core, Tests
messages: 299065
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: sys.executable can be not normalized
type: behavior
versions: Python 2.7, Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31030>
_______________________________________


More information about the New-bugs-announce mailing list