Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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
22 changes: 5 additions & 17 deletions 22 Lib/test/test_unicodedata.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
""" Test script for the unicodedata module.
""" Tests for the unicodedata module.

Written by Marc-Andre Lemburg (mal@lemburg.com).

(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.

"""

import hashlib
import sys
import unicodedata
import unittest
import hashlib
from test.support import script_helper

encoding = 'utf-8'
errors = 'surrogatepass'


### Run tests

class UnicodeMethodsTest(unittest.TestCase):

Expand Down Expand Up @@ -61,20 +57,12 @@ def test_method_checksum(self):
(char + 'ABC').title(),

]
h.update(''.join(data).encode(encoding, errors))
h.update(''.join(data).encode('utf-8', 'surrogatepass'))
result = h.hexdigest()
self.assertEqual(result, self.expectedchecksum)

class UnicodeDatabaseTest(unittest.TestCase):

def setUp(self):
# In case unicodedata is not available, this will raise an ImportError,
# but the other test cases will still be run
import unicodedata
self.db = unicodedata

def tearDown(self):
del self.db
db = unicodedata

class UnicodeFunctionsTest(UnicodeDatabaseTest):

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.