Skip to content

Commit eddd68d

Browse files
committed
As part of fixing bug #536241, add a test case for string.zfill() with Unicode
1 parent 102d120 commit eddd68d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/test_unicode.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
"""#"
88
from test_support import verify, verbose, TestFailed
9-
import sys
9+
import sys, string
1010

1111
if not sys.platform.startswith('java'):
1212
# Test basic sanity of repr()
@@ -206,6 +206,9 @@ def __getitem__(self, i): return self.seq[i]
206206
test('capwords', u'abc\tdef\nghi', u'Abc Def Ghi')
207207
test('capwords', u'abc\t def \nghi', u'Abc Def Ghi')
208208

209+
verify(string.zfill(u'34', 1) == u'34')
210+
verify(string.zfill(u'34', 5) == u'00034')
211+
209212
# Comparisons:
210213
print 'Testing Unicode comparisons...',
211214
verify(u'abc' == 'abc')

0 commit comments

Comments
 (0)