Back to index

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

List of all members.

Public Member Functions

def test_encodedfile
def test_streamreaderwriter

Detailed Description

Definition at line 1553 of file

Member Function Documentation

Definition at line 1554 of file

01555     def test_encodedfile(self):
01556         f = io.BytesIO(b"\xc3\xbc")
01557         with codecs.EncodedFile(f, "latin-1", "utf-8") as ef:
01558             self.assertEqual(, b"\xfc")

Here is the call graph for this function:

Definition at line 1559 of file

01560     def test_streamreaderwriter(self):
01561         f = io.BytesIO(b"\xc3\xbc")
01562         info = codecs.lookup("utf-8")
01563         with codecs.StreamReaderWriter(f, info.streamreader,
01564                                        info.streamwriter, 'strict') as srw:
01565             self.assertEqual(, "\xfc")

Here is the call graph for this function:

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