[issue32834] test_gdb fails with Posix locale in 3.7

STINNER Victor report at bugs.python.org
Sun Jan 27 12:22:30 EST 2019


STINNER Victor <vstinner at redhat.com> added the comment:

> Possibly fixed with issue34537 ?

"LC_ALL=C ./python -We -m test -vuall -m test_strings test_gdb" still fails for me on Fedora 29.

======================================================================
FAIL: test_strings (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of unicode strings
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/test/test_gdb.py", line 380, in test_strings
    check_repr('\u2620')
  File "/home/vstinner/prog/python/master/Lib/test/test_gdb.py", line 372, in check_repr
    self.assertGdbRepr(text)
  File "/home/vstinner/prog/python/master/Lib/test/test_gdb.py", line 302, in assertGdbRepr
    gdb_repr, gdb_output = self.get_gdb_repr('id(' + ascii(val) + ')')
  File "/home/vstinner/prog/python/master/Lib/test/test_gdb.py", line 269, in get_gdb_repr
    gdb_output = self.get_stack_trace(source, breakpoint=BREAKPOINT_FN,
  File "/home/vstinner/prog/python/master/Lib/test/test_gdb.py", line 249, in get_stack_trace
    self.assertEqual(unexpected_errlines, [])
AssertionError: Lists differ: ["Python Exception <class 'UnicodeEncodeEr[231 chars]): "] != []

First list contains 2 additional elements.
First extra element 0:
"Python Exception <class 'UnicodeEncodeError'> 'ascii' codec can't encode character '\\u2620' in position 1: ordinal not in range(128): "

+ []
- ["Python Exception <class 'UnicodeEncodeError'> 'ascii' codec can't encode "
-  "character '\\u2620' in position 1: ordinal not in range(128): ",
-  "Python Exception <class 'UnicodeEncodeError'> 'ascii' codec can't encode "
-  "character '\\u2620' in position 1: ordinal not in range(128): "]


Note: "LC_ALL=C ./python -m test -m test_strings test_gdb" (simpler command) also fails.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32834>
_______________________________________


More information about the Python-bugs-list mailing list