Skip to content

Commit dbc3d64

Browse files
author
Robert Booth
committed
remaining test_unicode* from v3.8.7
1 parent fd6e44a commit dbc3d64

4 files changed

Lines changed: 32 additions & 0 deletions

File tree

Lib/test/test_unicode_file.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ def _test_single(self, filename):
117117

118118
# The 'test' functions are unittest entry points, and simply call our
119119
# _test functions with each of the filename combinations we wish to test
120+
@unittest.skip("TODO: RUSTPYTHON")
120121
def test_single_files(self):
121122
self._test_single(TESTFN_UNICODE)
122123
if TESTFN_UNENCODABLE is not None:

Lib/test/test_unicode_file_functions.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def _apply_failure(self, fn, filename,
9292
"with bad filename in the exception: %a" %
9393
(fn.__name__, filename, exc_filename))
9494

95+
@unittest.skip("TODO: RUSTPYTHON")
9596
def test_failures(self):
9697
# Pass non-existing Unicode filenames all over the place.
9798
for name in self.files:
@@ -109,6 +110,7 @@ def test_failures(self):
109110
else:
110111
_listdir_failure = NotADirectoryError
111112

113+
@unittest.skip("TODO: RUSTPYTHON")
112114
def test_open(self):
113115
for name in self.files:
114116
f = open(name, 'wb')
@@ -121,6 +123,7 @@ def test_open(self):
121123
# NFD (a variant of Unicode NFD form). Normalize the filename to NFC, NFKC,
122124
# NFKD in Python is useless, because darwin will normalize it later and so
123125
# open(), os.stat(), etc. don't raise any exception.
126+
@unittest.skip("TODO: RUSTPYTHON")
124127
@unittest.skipIf(sys.platform == 'darwin', 'irrelevant test on Mac OS X')
125128
def test_normalize(self):
126129
files = set(self.files)

Lib/test/test_unicode_identifiers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
class PEP3131Test(unittest.TestCase):
44

5+
@unittest.skip("TODO: RUSTPYTHON")
56
def test_valid(self):
67
class T:
78
ä = 1
@@ -13,10 +14,13 @@ class T:
1314
self.assertEqual(getattr(T, '\u87d2'), 3)
1415
self.assertEqual(getattr(T, 'x\U000E0100'), 4)
1516

17+
# TODO: RUSTPYTHON
18+
@unittest.expectedFailure
1619
def test_non_bmp_normalized(self):
1720
𝔘𝔫𝔦𝔠𝔬𝔡𝔢 = 1
1821
self.assertIn("Unicode", dir())
1922

23+
@unittest.skip("TODO: RUSTPYTHON")
2024
def test_invalid(self):
2125
try:
2226
from test import badsyntax_3131

Lib/test/test_unicodedata.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class UnicodeMethodsTest(unittest.TestCase):
2222
# update this, if the database changes
2323
expectedchecksum = '9129d6f2bdf008a81c2476e5b5127014a62130c1'
2424

25+
@unittest.skip("TODO: RUSTPYTHON")
2526
def test_method_checksum(self):
2627
h = hashlib.sha1()
2728
for i in range(0x10000):
@@ -81,6 +82,7 @@ class UnicodeFunctionsTest(UnicodeDatabaseTest):
8182
# Update this if the database changes. Make sure to do a full rebuild
8283
# (e.g. 'make distclean && make') to get the correct checksum.
8384
expectedchecksum = 'c44a49ca7c5cb6441640fe174ede604b45028652'
85+
@unittest.skip("TODO: RUSTPYTHON")
8486
def test_function_checksum(self):
8587
data = []
8688
h = hashlib.sha1()
@@ -102,6 +104,7 @@ def test_function_checksum(self):
102104
result = h.hexdigest()
103105
self.assertEqual(result, self.expectedchecksum)
104106

107+
@unittest.skip("TODO: RUSTPYTHON")
105108
def test_digit(self):
106109
self.assertEqual(self.db.digit('A', None), None)
107110
self.assertEqual(self.db.digit('9'), 9)
@@ -114,6 +117,7 @@ def test_digit(self):
114117
self.assertRaises(TypeError, self.db.digit, 'xx')
115118
self.assertRaises(ValueError, self.db.digit, 'x')
116119

120+
@unittest.skip("TODO: RUSTPYTHON")
117121
def test_numeric(self):
118122
self.assertEqual(self.db.numeric('A',None), None)
119123
self.assertEqual(self.db.numeric('9'), 9)
@@ -127,6 +131,7 @@ def test_numeric(self):
127131
self.assertRaises(TypeError, self.db.numeric, 'xx')
128132
self.assertRaises(ValueError, self.db.numeric, 'x')
129133

134+
@unittest.skip("TODO: RUSTPYTHON")
130135
def test_decimal(self):
131136
self.assertEqual(self.db.decimal('A',None), None)
132137
self.assertEqual(self.db.decimal('9'), 9)
@@ -149,6 +154,8 @@ def test_category(self):
149154
self.assertRaises(TypeError, self.db.category)
150155
self.assertRaises(TypeError, self.db.category, 'xx')
151156

157+
# TODO: RUSTPYTHON
158+
@unittest.expectedFailure
152159
def test_bidirectional(self):
153160
self.assertEqual(self.db.bidirectional('\uFFFE'), '')
154161
self.assertEqual(self.db.bidirectional(' '), 'WS')
@@ -158,13 +165,15 @@ def test_bidirectional(self):
158165
self.assertRaises(TypeError, self.db.bidirectional)
159166
self.assertRaises(TypeError, self.db.bidirectional, 'xx')
160167

168+
@unittest.skip("TODO: RUSTPYTHON")
161169
def test_decomposition(self):
162170
self.assertEqual(self.db.decomposition('\uFFFE'),'')
163171
self.assertEqual(self.db.decomposition('\u00bc'), '<fraction> 0031 2044 0034')
164172

165173
self.assertRaises(TypeError, self.db.decomposition)
166174
self.assertRaises(TypeError, self.db.decomposition, 'xx')
167175

176+
@unittest.skip("TODO: RUSTPYTHON")
168177
def test_mirrored(self):
169178
self.assertEqual(self.db.mirrored('\uFFFE'), 0)
170179
self.assertEqual(self.db.mirrored('a'), 0)
@@ -174,6 +183,7 @@ def test_mirrored(self):
174183
self.assertRaises(TypeError, self.db.mirrored)
175184
self.assertRaises(TypeError, self.db.mirrored, 'xx')
176185

186+
@unittest.skip("TODO: RUSTPYTHON")
177187
def test_combining(self):
178188
self.assertEqual(self.db.combining('\uFFFE'), 0)
179189
self.assertEqual(self.db.combining('a'), 0)
@@ -208,6 +218,8 @@ def test_issue10254(self):
208218
b = 'C\u0338' * 20 + '\xC7'
209219
self.assertEqual(self.db.normalize('NFC', a), b)
210220

221+
# TODO: RUSTPYTHON
222+
@unittest.expectedFailure
211223
def test_issue29456(self):
212224
# Fix #29456
213225
u1176_str_a = '\u1100\u1176\u11a8'
@@ -223,6 +235,7 @@ def test_issue29456(self):
223235
# For tests of unicodedata.is_normalized / self.db.is_normalized ,
224236
# see test_normalization.py .
225237

238+
@unittest.skip("TODO: RUSTPYTHON")
226239
def test_east_asian_width(self):
227240
eaw = self.db.east_asian_width
228241
self.assertRaises(TypeError, eaw, b'a')
@@ -237,12 +250,15 @@ def test_east_asian_width(self):
237250
self.assertEqual(eaw('\u2010'), 'A')
238251
self.assertEqual(eaw('\U00020000'), 'W')
239252

253+
@unittest.skip("TODO: RUSTPYTHON")
240254
def test_east_asian_width_9_0_changes(self):
241255
self.assertEqual(self.db.ucd_3_2_0.east_asian_width('\u231a'), 'N')
242256
self.assertEqual(self.db.east_asian_width('\u231a'), 'W')
243257

244258
class UnicodeMiscTest(UnicodeDatabaseTest):
245259

260+
# TODO: RUSTPYTHON
261+
@unittest.expectedFailure
246262
def test_failed_import_during_compiling(self):
247263
# Issue 4367
248264
# Decoding \N escapes requires the unicodedata module. If it can't be
@@ -259,6 +275,7 @@ def test_failed_import_during_compiling(self):
259275
"(can't load unicodedata module)"
260276
self.assertIn(error, result.err.decode("ascii"))
261277

278+
@unittest.skip("TODO: RUSTPYTHON")
262279
def test_decimal_numeric_consistent(self):
263280
# Test that decimal and numeric are consistent,
264281
# i.e. if a character has a decimal value,
@@ -272,6 +289,7 @@ def test_decimal_numeric_consistent(self):
272289
count += 1
273290
self.assertTrue(count >= 10) # should have tested at least the ASCII digits
274291

292+
@unittest.skip("TODO: RUSTPYTHON")
275293
def test_digit_numeric_consistent(self):
276294
# Test that digit and numeric are consistent,
277295
# i.e. if a character has a digit value,
@@ -288,6 +306,7 @@ def test_digit_numeric_consistent(self):
288306
def test_bug_1704793(self):
289307
self.assertEqual(self.db.lookup("GOTHIC LETTER FAIHU"), '\U00010346')
290308

309+
@unittest.skip("TODO: RUSTPYTHON")
291310
def test_ucd_510(self):
292311
import unicodedata
293312
# In UCD 5.1.0, a mirrored property changed wrt. UCD 3.2.0
@@ -299,6 +318,7 @@ def test_ucd_510(self):
299318
self.assertTrue("\u1d79".upper()=='\ua77d')
300319
self.assertTrue(".".upper()=='.')
301320

321+
@unittest.skip("TODO: RUSTPYTHON")
302322
def test_bug_5828(self):
303323
self.assertEqual("\u1d79".lower(), "\u1d79")
304324
# Only U+0000 should have U+0000 as its upper/lower/titlecase variant
@@ -310,12 +330,16 @@ def test_bug_5828(self):
310330
[0]
311331
)
312332

333+
# TODO: RUSTPYTHON
334+
@unittest.expectedFailure
313335
def test_bug_4971(self):
314336
# LETTER DZ WITH CARON: DZ, Dz, dz
315337
self.assertEqual("\u01c4".title(), "\u01c5")
316338
self.assertEqual("\u01c5".title(), "\u01c5")
317339
self.assertEqual("\u01c6".title(), "\u01c5")
318340

341+
# TODO: RUSTPYTHON
342+
@unittest.expectedFailure
319343
def test_linebreak_7643(self):
320344
for i in range(0x10000):
321345
lines = (chr(i) + 'A').splitlines()

0 commit comments

Comments
 (0)