Back to index

python3.2  3.2.2
Public Member Functions
test.test_multibytecodec.Test_ISO2022 Class Reference

List of all members.

Public Member Functions

def test_g2
def test_iso2022_jp_g0
def test_bug1572832

Detailed Description

Definition at line 237 of file test_multibytecodec.py.


Member Function Documentation

Definition at line 249 of file test_multibytecodec.py.

00249 
00250     def test_bug1572832(self):
00251         if sys.maxunicode >= 0x10000:
00252             myunichr = chr
00253         else:
00254             myunichr = lambda x: chr(0xD7C0+(x>>10)) + chr(0xDC00+(x&0x3FF))
00255 
00256         for x in range(0x10000, 0x110000):
00257             # Any ISO 2022 codec will cause the segfault
00258             myunichr(x).encode('iso_2022_jp', 'ignore')

Here is the call graph for this function:

Definition at line 238 of file test_multibytecodec.py.

00238 
00239     def test_g2(self):
00240         iso2022jp2 = b'\x1b(B:hu4:unit\x1b.A\x1bNi de famille'
00241         uni = ':hu4:unit\xe9 de famille'
00242         self.assertEqual(iso2022jp2.decode('iso2022-jp-2'), uni)

Here is the call graph for this function:

Definition at line 243 of file test_multibytecodec.py.

00243 
00244     def test_iso2022_jp_g0(self):
00245         self.assertNotIn(b'\x0e', '\N{SOFT HYPHEN}'.encode('iso-2022-jp-2'))
00246         for encoding in ('iso-2022-jp-2004', 'iso-2022-jp-3'):
00247             e = '\u3406'.encode(encoding)
00248             self.assertFalse(any(x > 0x80 for x in e))

Here is the call graph for this function:


The documentation for this class was generated from the following file: