[New-bugs-announce] [issue8559] test_gdb: test_strings() fails with ASCII locale

STINNER Victor report at bugs.python.org
Wed Apr 28 15:58:59 CEST 2010


New submission from STINNER Victor <victor.stinner at haypocalc.com>:

http://www.python.org/dev/buildbot/builders/alpha Debian 3.x/builds/67/steps/test/logs/stdio

======================================================================
ERROR: test_strings (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of unicode strings
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/doko/buildarea/3.x.klose-debian-alpha/build/Lib/test/test_gdb.py", line 230, in test_strings
    self.assertGdbRepr('\u2620')
  File "/home/doko/buildarea/3.x.klose-debian-alpha/build/Lib/test/test_gdb.py", line 176, in assertGdbRepr
    cmds_after_breakpoint)
  File "/home/doko/buildarea/3.x.klose-debian-alpha/build/Lib/test/test_gdb.py", line 144, in get_gdb_repr
    import_site=import_site)
  File "/home/doko/buildarea/3.x.klose-debian-alpha/build/Lib/test/test_gdb.py", line 120, in get_stack_trace
    out, err = self.run_gdb(*args)
  File "/home/doko/buildarea/3.x.klose-debian-alpha/build/Lib/test/test_gdb.py", line 60, in run_gdb
    args, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
  File "/home/doko/buildarea/3.x.klose-debian-alpha/build/Lib/subprocess.py", line 670, in __init__
    restore_signals, start_new_session)
  File "/home/doko/buildarea/3.x.klose-debian-alpha/build/Lib/subprocess.py", line 1115, in _execute_child
    restore_signals, start_new_session, preexec_fn)
UnicodeEncodeError: 'ascii' codec can't encode character '\u2620' in position 4: ordinal not in range(128)

You can try with: "LANG= ./python Lib/test/regrtest.py test_gdb".

We should skip the test if '\u2620' is not encodable to sys.getfileystemencoding(), or maybe use '\\u2620'.

----------
components: Tests, Unicode
messages: 104431
nosy: dmalcolm, haypo, loewis
priority: normal
severity: normal
status: open
title: test_gdb: test_strings() fails with ASCII locale
versions: Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8559>
_______________________________________


More information about the New-bugs-announce mailing list