Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 774c931

Browse files
committed
M.-A. Lemburg <[email protected]>:
Added another test for string formatting (the one that produced the core dump now fixed in unicodeobject.c).
1 parent 8b4d01d commit 774c931

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Lib/test/test_unicode.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,12 @@ def __init__(self): self.seq = [7, u'hello', 123L]
263263
assert '...%(foo)s...' % {u'foo':u"abc",u'def':123} == u'...abc...'
264264
assert '...%s...%s...%s...%s...' % (1,2,3,u"abc") == u'...1...2...3...abc...'
265265
assert '...%s...' % u"abc" == u'...abc...'
266+
try:
267+
'...%s...äöü...' % u"abc"
268+
except ValueError:
269+
pass
270+
else:
271+
raise AssertionError, "'...%s...äöü...' % u'abc' failed to raise an exception"
266272
print 'done.'
267273

268274
# Test builtin codecs

0 commit comments

Comments
 (0)