Back to index

python3.2  3.2.2
Public Member Functions | Static Public Attributes
test.test_multibytecodec.TestHZStateful Class Reference
Inheritance diagram for test.test_multibytecodec.TestHZStateful:
Inheritance graph
[legend]
Collaboration diagram for test.test_multibytecodec.TestHZStateful:
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 = '\u804a\u804a'
string encoding = 'hz'
string expected = '~{ADAD'
string expected_reset = '~{ADAD~}'

Detailed Description

Definition at line 283 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 from test.test_multibytecodec.TestStateful.

Definition at line 285 of file test_multibytecodec.py.

Reimplemented from test.test_multibytecodec.TestStateful.

Definition at line 286 of file test_multibytecodec.py.

Reimplemented from test.test_multibytecodec.TestStateful.

Definition at line 287 of file test_multibytecodec.py.

Reimplemented from test.test_multibytecodec.TestStateful.

Definition at line 284 of file test_multibytecodec.py.


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