Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Address code review
  • Loading branch information
corona10 committed Feb 6, 2023
commit c1976653b1fa15a08f4ff0008d001e1bbec0b602
16 changes: 0 additions & 16 deletions Lib/test/test_unicodedata.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import hashlib
from http.client import HTTPException
import random
import sys
import unicodedata
import unittest
Expand Down Expand Up @@ -217,21 +216,6 @@ def test_issue29456(self):
self.assertEqual(self.db.normalize('NFC', u11a7_str_a), u11a7_str_b)
self.assertEqual(self.db.normalize('NFC', u11c3_str_a), u11c3_str_b)

def test_is_normalized_unicode_3_2_0(self):
sample_chrs = random.sample(range(0x110000), 100)
for form in ('NFC', 'NFD', 'NFKC', 'NFKD'):
with self.subTest(form=form):
for x in sample_chrs:
norm = self.db.ucd_3_2_0.normalize(form, chr(x))
self.assertTrue(self.db.ucd_3_2_0.is_normalized(form, norm))

def test_is_normalized_unicode_3_2_0_multicharacter(self):
sample_chrs = random.sample(range(0x110000), 100)
for form in ('NFC', 'NFD', 'NFKC', 'NFKD'):
s = ''.join(map(chr, sample_chrs))
norm = self.db.ucd_3_2_0.normalize(form, s)
self.assertTrue(self.db.ucd_3_2_0.is_normalized(form, norm))

def test_east_asian_width(self):
eaw = self.db.east_asian_width
self.assertRaises(TypeError, eaw, b'a')
Expand Down