Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
test.outstanding_bugs.TextIOWrapperTest Class Reference

List of all members.

Public Member Functions

def setUp
def tearDown
def test_issue1395_1
def test_issue1395_2
def test_issue1395_3
def test_issue1395_4
def test_issue1395_5

Public Attributes

 testdata
 normalized

Detailed Description

Definition at line 18 of file outstanding_bugs.py.


Member Function Documentation

Definition at line 20 of file outstanding_bugs.py.

00020 
00021     def setUp(self):
00022         self.testdata = b"AAA\r\nBBB\rCCC\r\nDDD\nEEE\r\n"
00023         self.normalized = b"AAA\nBBB\nCCC\nDDD\nEEE\n".decode("ASCII")

Here is the caller graph for this function:

Definition at line 24 of file outstanding_bugs.py.

00024 
00025     def tearDown(self):
00026         support.unlink(support.TESTFN)
00027 

Here is the caller graph for this function:

Definition at line 28 of file outstanding_bugs.py.

00028 
00029     def test_issue1395_1(self):
00030         txt = io.TextIOWrapper(io.BytesIO(self.testdata), encoding="ASCII")
00031 
00032         # read one char at a time
00033         reads = ""
00034         while True:
00035             c = txt.read(1)
00036             if not c:
00037                 break
00038             reads += c
00039         self.assertEqual(reads, self.normalized)

Here is the call graph for this function:

Definition at line 40 of file outstanding_bugs.py.

00040 
00041     def test_issue1395_2(self):
00042         txt = io.TextIOWrapper(io.BytesIO(self.testdata), encoding="ASCII")
00043         txt._CHUNK_SIZE = 4
00044 
00045         reads = ""
00046         while True:
00047             c = txt.read(4)
00048             if not c:
00049                 break
00050             reads += c
00051         self.assertEqual(reads, self.normalized)

Here is the call graph for this function:

Definition at line 52 of file outstanding_bugs.py.

00052 
00053     def test_issue1395_3(self):
00054         txt = io.TextIOWrapper(io.BytesIO(self.testdata), encoding="ASCII")
00055         txt._CHUNK_SIZE = 4
00056 
00057         reads = txt.read(4)
00058         reads += txt.read(4)
00059         reads += txt.readline()
00060         reads += txt.readline()
00061         reads += txt.readline()
00062         self.assertEqual(reads, self.normalized)

Here is the call graph for this function:

Definition at line 63 of file outstanding_bugs.py.

00063 
00064     def test_issue1395_4(self):
00065         txt = io.TextIOWrapper(io.BytesIO(self.testdata), encoding="ASCII")
00066         txt._CHUNK_SIZE = 4
00067 
00068         reads = txt.read(4)
00069         reads += txt.read()
00070         self.assertEqual(reads, self.normalized)

Here is the call graph for this function:

Definition at line 71 of file outstanding_bugs.py.

00071 
00072     def test_issue1395_5(self):
00073         txt = io.TextIOWrapper(io.BytesIO(self.testdata), encoding="ASCII")
00074         txt._CHUNK_SIZE = 4
00075 
00076         reads = txt.read(4)
00077         pos = txt.tell()
00078         txt.seek(0)
00079         txt.seek(pos)
00080         self.assertEqual(txt.read(4), "BBB\n")
00081 
00082 

Here is the call graph for this function:


Member Data Documentation

Definition at line 22 of file outstanding_bugs.py.

Definition at line 21 of file outstanding_bugs.py.


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