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

Skip to content

Commit faa663f

Browse files
committed
Fixed a failure in test_bigmem.
Merged revision 79059 via svnmerge from svn+ssh://[email protected]/python/trunk ........ r79059 | florent.xicluna | 2010-03-18 22:50:06 +0100 (jeu, 18 mar 2010) | 2 lines Issue #8024: Update the Unicode database to 5.2 ........
1 parent 4310652 commit faa663f

7 files changed

Lines changed: 21656 additions & 19136 deletions

File tree

Lib/test/test_bigmem.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ def test_encode_ascii(self, size):
618618
@precisionbigmemtest(size=_4G // 5, memuse=character_size * (6 + 1))
619619
def test_unicode_repr_overflow(self, size):
620620
try:
621-
s = "\uAAAA"*size
621+
s = "\uDCBA"*size
622622
r = repr(s)
623623
except MemoryError:
624624
pass # acceptable on 32-bit
@@ -679,22 +679,24 @@ def test_repr_large(self, size):
679679

680680
@bigmemtest(minsize=2**32 / 5, memuse=character_size * 7)
681681
def test_unicode_repr(self, size):
682-
s = "\uAAAA" * size
682+
# Use an assigned, but not printable code point.
683+
# It is in the range of the low surrogates \uDC00-\uDFFF.
684+
s = "\uDCBA" * size
683685
for f in (repr, ascii):
684686
r = f(s)
685687
self.assertTrue(len(r) > size)
686-
self.assertTrue(r.endswith(r"\uaaaa'"), r[-10:])
688+
self.assertTrue(r.endswith(r"\udcba'"), r[-10:])
687689
del r
688690

689691
# The character takes 4 bytes even in UCS-2 builds because it will
690692
# be decomposed into surrogates.
691693
@bigmemtest(minsize=2**32 / 5, memuse=4 + character_size * 9)
692694
def test_unicode_repr_wide(self, size):
693-
s = "\U0001AAAA" * size
695+
s = "\U0001DCBA" * size
694696
for f in (repr, ascii):
695697
r = f(s)
696698
self.assertTrue(len(r) > size)
697-
self.assertTrue(r.endswith(r"\U0001aaaa'"), r[-12:])
699+
self.assertTrue(r.endswith(r"\U0001dcba'"), r[-12:])
698700
del r
699701

700702

Lib/test/test_unicodedata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
class UnicodeMethodsTest(unittest.TestCase):
2222

2323
# update this, if the database changes
24-
expectedchecksum = '0b915116051f3ed029a98542c2b7df63c9646272'
24+
expectedchecksum = '4504dffd035baea02c5b9de82bebc3d65e0e0baf'
2525

2626
def test_method_checksum(self):
2727
h = hashlib.sha1()
@@ -80,7 +80,7 @@ def tearDown(self):
8080
class UnicodeFunctionsTest(UnicodeDatabaseTest):
8181

8282
# update this, if the database changes
83-
expectedchecksum = 'd4169ccff998ebbd1ec007a0b3fbd66e5ccf0229'
83+
expectedchecksum = '6ccf1b1a36460d2694f9b0b0f0324942fe70ede6'
8484

8585
def test_function_checksum(self):
8686
data = []

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,8 @@ C-API
285285
Library
286286
-------
287287

288+
- Issue #8024: Update the Unicode database to 5.2.
289+
288290
- Issue #8168: py_compile now handles files with utf-8 BOMS.
289291

290292
- ``tokenize.detect_encoding`` now returns ``'utf-8-sig'`` when a UTF-8 BOM is

Modules/unicodedata_db.h

Lines changed: 3515 additions & 3163 deletions
Large diffs are not rendered by default.

Modules/unicodename_db.h

Lines changed: 16937 additions & 15004 deletions
Large diffs are not rendered by default.

Objects/unicodetype_db.h

Lines changed: 1192 additions & 961 deletions
Large diffs are not rendered by default.

Tools/unicode/makeunicodedata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
VERSION = "2.6"
3232

3333
# The Unicode Database
34-
UNIDATA_VERSION = "5.1.0"
34+
UNIDATA_VERSION = "5.2.0"
3535
UNICODE_DATA = "UnicodeData%s.txt"
3636
COMPOSITION_EXCLUSIONS = "CompositionExclusions%s.txt"
3737
EASTASIAN_WIDTH = "EastAsianWidth%s.txt"

0 commit comments

Comments
 (0)