Use integer above sys.maxunicode for range test. Fixes #608884.

2.2.2 candidate.
This commit is contained in:
Martin v. Löwis 2002-09-14 09:10:04 +00:00
parent 6622eecdaa
commit 766e300eaa
1 changed files with 2 additions and 2 deletions

View File

@ -461,13 +461,13 @@ def test_fixup(s):
else: else:
verify(value == u'abc, def') verify(value == u'abc, def')
for ordinal in (-100, 0x20000): for ordinal in (-100, 0x200000):
try: try:
u"%c" % ordinal u"%c" % ordinal
except ValueError: except ValueError:
pass pass
else: else:
print '*** formatting u"%%c" % %i should give a ValueError' % ordinal print '*** formatting u"%%c" %% %i should give a ValueError' % ordinal
# formatting jobs delegated from the string implementation: # formatting jobs delegated from the string implementation:
verify('...%(foo)s...' % {'foo':u"abc"} == u'...abc...') verify('...%(foo)s...' % {'foo':u"abc"} == u'...abc...')