Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-37758: Extend unicodedata checksum tests to cover all of Unicode. #15125

Merged
merged 1 commit into from
Sep 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions Lib/test/test_unicodedata.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@
import sys
import unicodedata
import unittest
from test.support import open_urlresource, script_helper
from test.support import open_urlresource, requires_resource, script_helper


class UnicodeMethodsTest(unittest.TestCase):

# update this, if the database changes
expectedchecksum = '9129d6f2bdf008a81c2476e5b5127014a62130c1'
expectedchecksum = 'e728278035eb76cf92d86f07852266b0433f16a5'

@requires_resource('cpu')
def test_method_checksum(self):
h = hashlib.sha1()
for i in range(0x10000):
for i in range(sys.maxunicode + 1):
char = chr(i)
data = [
# Predicates (single char)
Expand Down Expand Up @@ -69,12 +70,14 @@ class UnicodeFunctionsTest(UnicodeDatabaseTest):

# Update this if the database changes. Make sure to do a full rebuild
# (e.g. 'make distclean && make') to get the correct checksum.
expectedchecksum = 'c44a49ca7c5cb6441640fe174ede604b45028652'
expectedchecksum = '4bcbf9df344114b1ebc95b904f4352dd250dff7e'

@requires_resource('cpu')
def test_function_checksum(self):
data = []
h = hashlib.sha1()

for i in range(0x10000):
for i in range(sys.maxunicode + 1):
char = chr(i)
data = [
# Properties
Expand Down