New submission from Jeroen Demeyer <j.deme...@ugent.be>: Setting PYTHONUSERBASE=/tmp/x/.. causes the Python test suite to fail:
====================================================================== FAIL: test_user_similar (test.test_sysconfig.TestSysConfig) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/src/sage-config/local/src/cpython/Lib/test/test_sysconfig.py", line 276, in test_user_similar self.assertEqual(user_path, global_path.replace(base, user, 1)) AssertionError: '/tmp/lib/python3.8' != '/tmp/x/../lib/python3.8' - /tmp/lib/python3.8 + /tmp/x/../lib/python3.8 ? +++++ ====================================================================== FAIL: test_get_path (test.test_site.HelperFunctionsTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/src/sage-config/local/src/cpython/Lib/test/test_site.py", line 192, in test_get_path sysconfig.get_path('purelib', scheme)) AssertionError: '/tmp/x/../lib/python3.8/site-packages' != '/tmp/lib/python3.8/site-packages' - /tmp/x/../lib/python3.8/site-packages ? ----- + /tmp/lib/python3.8/site-packages ====================================================================== FAIL: test_s_option (test.test_site.HelperFunctionsTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/src/sage-config/local/src/cpython/Lib/test/test_site.py", line 199, in test_s_option self.assertIn(usersite, sys.path) AssertionError: '/tmp/x/../lib/python3.8/site-packages' not found in ['/usr/local/src/sage-config/local/src/cpython', '/usr/local/src/sage-config/local/lib/python38.zip', '/usr/local/src/sage-config/local/src/cpython/Lib', '/usr/local/src/sage-config/local/src/cpython/build/lib.linux-x86_64-3.8', '/usr/local/src/sage-config/local/lib/python3.8/site-packages'] ---------- components: Tests messages: 314931 nosy: jdemeyer priority: normal severity: normal status: open title: Various test failures if PYTHONUSERBASE is not canonicalized type: behavior versions: Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33222> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com