This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_site fails when installed into $HOME/.local
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.3, Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, pitrou, python-dev
Priority: low Keywords: patch

Created on 2013-10-23 09:35 by pitrou, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_site_19360.patch pitrou, 2013-10-23 09:37 review
Messages (3)
msg201011 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-10-23 09:35
If I configure Python with "$HOME/.local" as a prefix, test_site fails:

======================================================================
FAIL: test_s_option (test.test_site.HelperFunctionsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/antoine/cpython/opt/Lib/test/test_site.py", line 182, in test_s_option
    self.assertEqual(rc, 0)
AssertionError: 1 != 0

This is because the user site then falls in the same place as the "main" site-packages:

>>> site.getsitepackages()
['/home/antoine/.local/lib/python3.4/site-packages', '/home/antoine/.local/lib/site-python']
>>> site.getusersitepackages()
'/home/antoine/.local/lib/python3.4/site-packages'

(what is "site-python" btw??)
msg201012 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-10-23 09:37
Proposed patch.
msg201064 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-10-23 20:04
New changeset 7f465e154b6d by Antoine Pitrou in branch '3.3':
Issue #19360: fix test_site when Python is installed into $HOME/.local
http://hg.python.org/cpython/rev/7f465e154b6d

New changeset 61463ff7dc68 by Antoine Pitrou in branch 'default':
Issue #19360: fix test_site when Python is installed into $HOME/.local
http://hg.python.org/cpython/rev/61463ff7dc68
History
Date User Action Args
2022-04-11 14:57:52adminsetgithub: 63559
2013-10-23 20:04:28pitrousetstatus: open -> closed
resolution: fixed
stage: needs patch -> resolved
2013-10-23 20:04:01python-devsetnosy: + python-dev
messages: + msg201064
2013-10-23 09:37:13pitrousetfiles: + test_site_19360.patch
keywords: + patch
messages: + msg201012
2013-10-23 09:35:30pitroucreate