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: Clean out vestigial script-bits from test_unicodedata. #15126

Merged
merged 1 commit into from
Aug 13, 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
22 changes: 5 additions & 17 deletions 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