|
1 | 1 | """ Test script for the Unicode implementation.
|
2 | 2 |
|
3 |
| -
|
4 | 3 | Written by Marc-Andre Lemburg (mal@lemburg.com).
|
5 | 4 |
|
6 | 5 | (c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
|
@@ -250,50 +249,6 @@ def __init__(self): self.seq = [7, u'hello', 123L]
|
250 | 249 | assert u"%(x)s, %(ä)s" % {'x':u"abc", u'ä'.encode('utf-8'):"def"} == u'abc, def'
|
251 | 250 | print 'done.'
|
252 | 251 |
|
253 |
| -# Test Unicode database APIs |
254 |
| -try: |
255 |
| - import unicodedata |
256 |
| -except ImportError: |
257 |
| - pass |
258 |
| -else: |
259 |
| - print 'Testing unicodedata module...', |
260 |
| - |
261 |
| - assert unicodedata.digit(u'A',None) is None |
262 |
| - assert unicodedata.digit(u'9') == 9 |
263 |
| - assert unicodedata.digit(u'\u215b',None) is None |
264 |
| - assert unicodedata.digit(u'\u2468') == 9 |
265 |
| - |
266 |
| - assert unicodedata.numeric(u'A',None) is None |
267 |
| - assert unicodedata.numeric(u'9') == 9 |
268 |
| - assert unicodedata.numeric(u'\u215b') == 0.125 |
269 |
| - assert unicodedata.numeric(u'\u2468') == 9.0 |
270 |
| - |
271 |
| - assert unicodedata.decimal(u'A',None) is None |
272 |
| - assert unicodedata.decimal(u'9') == 9 |
273 |
| - assert unicodedata.decimal(u'\u215b',None) is None |
274 |
| - assert unicodedata.decimal(u'\u2468',None) is None |
275 |
| - |
276 |
| - assert unicodedata.category(u'\uFFFE') == 'Cn' |
277 |
| - assert unicodedata.category(u'a') == 'Ll' |
278 |
| - assert unicodedata.category(u'A') == 'Lu' |
279 |
| - |
280 |
| - assert unicodedata.bidirectional(u'\uFFFE') == '' |
281 |
| - assert unicodedata.bidirectional(u' ') == 'WS' |
282 |
| - assert unicodedata.bidirectional(u'A') == 'L' |
283 |
| - |
284 |
| - assert unicodedata.decomposition(u'\uFFFE') == '' |
285 |
| - assert unicodedata.decomposition(u'\u00bc') == '<fraction> 0031 2044 0034' |
286 |
| - |
287 |
| - assert unicodedata.mirrored(u'\uFFFE') == 0 |
288 |
| - assert unicodedata.mirrored(u'a') == 0 |
289 |
| - assert unicodedata.mirrored(u'\u2201') == 1 |
290 |
| - |
291 |
| - assert unicodedata.combining(u'\uFFFE') == 0 |
292 |
| - assert unicodedata.combining(u'a') == 0 |
293 |
| - assert unicodedata.combining(u'\u20e1') == 230 |
294 |
| - |
295 |
| - print 'done.' |
296 |
| - |
297 | 252 | # Test builtin codecs
|
298 | 253 | print 'Testing builtin codecs...',
|
299 | 254 |
|
|
0 commit comments