diff options
Diffstat (limited to 'Lib/test/test_gdb.py')
| -rw-r--r-- | Lib/test/test_gdb.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py index bac8d36..d80acfe 100644 --- a/Lib/test/test_gdb.py +++ b/Lib/test/test_gdb.py @@ -234,7 +234,9 @@ class PrettyPrintTests(DebuggerTests): text.encode(encoding) printable = True except UnicodeEncodeError: - self.assertGdbRepr(text, ascii(text)) + # Workaround ascii() bug on UCS-2 builds: issue #9804 + asc = "'" + text.encode('unicode-escape').decode('ascii') + "'" + self.assertGdbRepr(text, asc) else: self.assertGdbRepr(text) |
