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.

Title: test_sysconfig.test_srcdir fails when sys.base_prefix="/"
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.3, Python 3.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: pitrou, python-dev, sunfinite, tarek
Priority: low Keywords: patch

Created on 2013-10-21 21:22 by sunfinite, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit
test_sysconfig.patch sunfinite, 2013-10-23 12:22 A possible patch review
Messages (4)
msg200849 - (view) Author: Sunny K (sunfinite) * Date: 2013-10-21 21:22
While working on issue7757, i noticed that test_srcdir fails when python is built with prefix "".

This is because in Lib/, _safe_realpath() is called on srcdir which normalises //lib to /lib. In the test case, it is compared directly to the output of get_makefile_filename().

FAIL: test_srcdir (__main__.TestSysConfig)
Traceback (most recent call last):
  File "/lib/python3.4/test/", line 356, in test_srcdir
AssertionError: '//lib/python3.4/config-3.4dm' != '/lib/python3.4/config-3.4dm'
- //lib/python3.4/config-3.4dm
? -
+ /lib/python3.4/config-3.4dm

~/cpython$ python3.4
Python 3.4.0a3+ (default:dad1debba93c+, Oct 22 2013, 02:32:50)
[GCC 4.4.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.prefix
>>> sys.base_prefix
msg201021 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-10-23 13:25
Patch looks fine to me.
msg201044 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-10-23 17:08
New changeset ef6eb5ce4f8e by Antoine Pitrou in branch '3.3':
Issue #19340: Fix test_sysconfig when Python is built with an empty prefix.

New changeset f797a14cbcfd by Antoine Pitrou in branch 'default':
Issue #19340: Fix test_sysconfig when Python is built with an empty prefix.
msg201045 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-10-23 17:09
Patched committed, thank you!
Date User Action Args
2022-04-11 14:57:52adminsetgithub: 63539
2013-10-23 17:09:19pitrousetstatus: open -> closed
resolution: fixed
messages: + msg201045

stage: patch review -> resolved
2013-10-23 17:08:16python-devsetnosy: + python-dev
messages: + msg201044
2013-10-23 13:25:17pitrousetpriority: normal -> low
versions: + Python 3.3
nosy: + pitrou

messages: + msg201021

stage: patch review
2013-10-23 12:32:00sunfinitesetnosy: + tarek
2013-10-23 12:22:22sunfinitesetfiles: + test_sysconfig.patch
keywords: + patch
2013-10-21 21:22:36sunfinitecreate