Back to index

python3.2  3.2.2
Public Member Functions | Static Public Attributes
test.test_multibytecodec.TestStateful Class Reference
Inheritance diagram for test.test_multibytecodec.TestStateful:
Inheritance graph
[legend]
Collaboration diagram for test.test_multibytecodec.TestStateful:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_encode
def test_incrementalencoder
def test_incrementalencoder_final

Static Public Attributes

string text = '\u4E16\u4E16'
string encoding = 'iso-2022-jp'
string expected = '\x1b$B@$@$'
string expected_reset = '\x1b$B@$@$\x1b(B'

Detailed Description

Definition at line 259 of file test_multibytecodec.py.


Member Function Documentation

Definition at line 265 of file test_multibytecodec.py.

00265 
00266     def test_encode(self):
00267         self.assertEqual(self.text.encode(self.encoding), self.expected_reset)

Here is the call graph for this function:

Definition at line 268 of file test_multibytecodec.py.

00268 
00269     def test_incrementalencoder(self):
00270         encoder = codecs.getincrementalencoder(self.encoding)()
00271         output = b''.join(
00272             encoder.encode(char)
00273             for char in self.text)
00274         self.assertEqual(output, self.expected)

Here is the call graph for this function:

Definition at line 275 of file test_multibytecodec.py.

00275 
00276     def test_incrementalencoder_final(self):
00277         encoder = codecs.getincrementalencoder(self.encoding)()
00278         last_index = len(self.text) - 1
00279         output = b''.join(
00280             encoder.encode(char, index == last_index)
00281             for index, char in enumerate(self.text))
00282         self.assertEqual(output, self.expected_reset)

Here is the call graph for this function:


Member Data Documentation

Reimplemented in test.test_multibytecodec.TestHZStateful.

Definition at line 261 of file test_multibytecodec.py.

Reimplemented in test.test_multibytecodec.TestHZStateful.

Definition at line 262 of file test_multibytecodec.py.

Reimplemented in test.test_multibytecodec.TestHZStateful.

Definition at line 263 of file test_multibytecodec.py.

Reimplemented in test.test_multibytecodec.TestHZStateful.

Definition at line 260 of file test_multibytecodec.py.


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