[New-bugs-announce] [issue19340] test_sysconfig.test_srcdir fails when sys.base_prefix="/"

Sunny K report at bugs.python.org
Mon Oct 21 23:22:36 CEST 2013

New submission from Sunny K:

While working on issue7757, i noticed that test_srcdir fails when python is built with prefix "".

This is because in Lib/sysconfig.py, _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/test_sysconfig.py", 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

components: Tests
messages: 200849
nosy: sunfinite
priority: normal
severity: normal
status: open
title: test_sysconfig.test_srcdir fails when sys.base_prefix="/"
type: behavior
versions: Python 3.4

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list