Issue 7605: test_cmd_line fails with non-ascii path (original) (raw)

Issue7605

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:55 admin set github: 51854
2010-04-16 15:45:30 vstinner set status: open -> closedresolution: fixed
2010-04-16 15:44:59 vstinner set messages: +
2010-04-16 15:00:11 vstinner set files: + test_cmd_line.patchnosy: + vstinnermessages: + keywords: + patch
2009-12-30 21:44:35 pitrou create