[New-bugs-announce] [issue33222] Various test failures if PYTHONUSERBASE is not canonicalized
Jeroen Demeyer
report at bugs.python.org
Wed Apr 4 10:00:04 EDT 2018
New submission from Jeroen Demeyer <J.Demeyer at 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 <report at bugs.python.org>
<https://bugs.python.org/issue33222>
_______________________________________
More information about the New-bugs-announce
mailing list