[issue14088] sys.executable generating canonical path

STINNER Victor report at bugs.python.org
Mon Aug 30 11:16:42 EDT 2021


STINNER Victor <vstinner at python.org> added the comment:

test_sys:

    def test_executable(self):
        # sys.executable should be absolute
        self.assertEqual(os.path.abspath(sys.executable), sys.executable)

IMO the test is wrong. It must test: test.assertTrue(os.path.isabs(sys.executable)).

The path is not required to be normalized.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue14088>
_______________________________________


More information about the Python-bugs-list mailing list