Back to index

python3.2  3.2.2
Public Member Functions
test.test_codecs.TransformCodecTest Class Reference

List of all members.

Public Member Functions

def test_basics
def test_read
def test_readline

Detailed Description

Definition at line 1706 of file test_codecs.py.


Member Function Documentation

Definition at line 1708 of file test_codecs.py.

01708 
01709     def test_basics(self):
01710         binput = bytes(range(256))
01711         for encoding in bytes_transform_encodings:
01712             # generic codecs interface
01713             (o, size) = codecs.getencoder(encoding)(binput)
01714             self.assertEqual(size, len(binput))
01715             (i, size) = codecs.getdecoder(encoding)(o)
01716             self.assertEqual(size, len(o))
01717             self.assertEqual(i, binput)

Here is the call graph for this function:

Definition at line 1718 of file test_codecs.py.

01718 
01719     def test_read(self):
01720         for encoding in bytes_transform_encodings:
01721             sin = codecs.encode(b"\x80", encoding)
01722             reader = codecs.getreader(encoding)(io.BytesIO(sin))
01723             sout = reader.read()
01724             self.assertEqual(sout, b"\x80")

Here is the call graph for this function:

Definition at line 1725 of file test_codecs.py.

01725 
01726     def test_readline(self):
01727         for encoding in bytes_transform_encodings:
01728             if encoding in ['uu_codec', 'zlib_codec']:
01729                 continue
01730             sin = codecs.encode(b"\x80", encoding)
01731             reader = codecs.getreader(encoding)(io.BytesIO(sin))
01732             sout = reader.readline()
01733             self.assertEqual(sout, b"\x80")
01734 

Here is the call graph for this function:


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