diff options
author | Walter Dörwald <walter@livinglogic.de> | 2003-03-31 18:07:50 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2003-03-31 18:07:50 (GMT) |
commit | 43440a621e022fbeaff24f84dcf4d5458601fedc (patch) | |
tree | 4ffebf718b3a2fef2e38d3b441975b30dde80ea6 /Lib/test/string_tests.py | |
parent | 2a04623ddd8c15a1d559440a5f4a63d43a3cafd7 (diff) | |
download | cpython-43440a621e022fbeaff24f84dcf4d5458601fedc.zip cpython-43440a621e022fbeaff24f84dcf4d5458601fedc.tar.gz cpython-43440a621e022fbeaff24f84dcf4d5458601fedc.tar.bz2 |
Fix PyString_Format() so that '%c' % u'a' returns u'a'
instead of raising a TypeError. (From SF patch #710127)
Add tests to verify this is fixed.
Add various tests for '%c' % int.
Diffstat (limited to 'Lib/test/string_tests.py')
-rw-r--r-- | Lib/test/string_tests.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py index 4bcd121..dcf961d 100644 --- a/Lib/test/string_tests.py +++ b/Lib/test/string_tests.py @@ -543,6 +543,7 @@ class MixinStrUnicodeUserStringTest: self.checkequal('"', "%c", '__mod__', 34) self.checkequal('$', "%c", '__mod__', 36) self.checkequal('10', "%d", '__mod__', 10) + self.checkequal('\x7f', "%c", '__mod__', 0x7f) for ordinal in (-100, 0x200000): # unicode raises ValueError, str raises OverflowError |