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_cmd_line fails with non-ascii path
Type: behavior Stage: needs patch
Components: Library (Lib), Tests Versions: Python 3.1, Python 3.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: pitrou, vstinner
Priority: normal Keywords: patch

Created on 2009-12-30 21:44 by pitrou, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_cmd_line.patch vstinner, 2010-04-16 15:00
Messages (3)
msg97062 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-12-30 21:44
I configured my buildbot to use a non-ascii path to the interpreter and
test_cmd_line fails as follows:

======================================================================
FAIL: test_large_PYTHONPATH (test.test_cmd_line.CmdLineTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/home/buildbot/cpython-ucs4-nonascii-€/3.1.pitrou-ubuntu-wide/build/Lib/test/test_cmd_line.py",
line 181, in test_large_PYTHONPATH
    self.assertTrue(path1.encode('ascii') in stdout)
AssertionError: False is not True

----------------------------------------------------------------------
msg103329 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2010-04-16 15:00
The problem is that the print is failing because Python uses ASCII encoding for stdout. Attached patch encodes sys.path to ASCII using backslashreplace to avoid the encoding issue.
msg103334 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2010-04-16 15:44
Fixed: r80116 (py3k), r80117 (3.1).
History
Date User Action Args
2022-04-11 14:56:55adminsetgithub: 51854
2010-04-16 15:45:30vstinnersetstatus: open -> closed
resolution: fixed
2010-04-16 15:44:59vstinnersetmessages: + msg103334
2010-04-16 15:00:11vstinnersetfiles: + test_cmd_line.patch

nosy: + vstinner
messages: + msg103329

keywords: + patch
2009-12-30 21:44:35pitroucreate