summaryrefslogtreecommitdiffstats
path: root/Lib/test/outstanding_bugs.py
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2013-12-20 19:25:07 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2013-12-20 19:25:07 (GMT)
commitbdce938af2af03b2eb0d0e4731f1b8c4b965eaf5 (patch)
tree573e8ecf83ce5f807d9b0f8e53249b588eae52ba /Lib/test/outstanding_bugs.py
parent715233c3cda644be95809b732b019e5802ceeb1c (diff)
downloadcpython-bdce938af2af03b2eb0d0e4731f1b8c4b965eaf5.zip
cpython-bdce938af2af03b2eb0d0e4731f1b8c4b965eaf5.tar.gz
cpython-bdce938af2af03b2eb0d0e4731f1b8c4b965eaf5.tar.bz2
Update test.outstanding_bugs.py
Diffstat (limited to 'Lib/test/outstanding_bugs.py')
-rw-r--r--Lib/test/outstanding_bugs.py74
1 files changed, 2 insertions, 72 deletions
diff --git a/Lib/test/outstanding_bugs.py b/Lib/test/outstanding_bugs.py
index 0849ee5..7e527a6 100644
--- a/Lib/test/outstanding_bugs.py
+++ b/Lib/test/outstanding_bugs.py
@@ -10,79 +10,9 @@ import unittest
from test import support
#
-# One test case for outstanding bugs at the moment:
+# No test cases for outstanding bugs at the moment.
#
-# test_io
-import io
-class TextIOWrapperTest(unittest.TestCase):
-
- def setUp(self):
- self.testdata = b"AAA\r\nBBB\rCCC\r\nDDD\nEEE\r\n"
- self.normalized = b"AAA\nBBB\nCCC\nDDD\nEEE\n".decode("ASCII")
-
- def tearDown(self):
- support.unlink(support.TESTFN)
-
-
- def test_issue1395_1(self):
- txt = io.TextIOWrapper(io.BytesIO(self.testdata), encoding="ASCII")
-
- # read one char at a time
- reads = ""
- while True:
- c = txt.read(1)
- if not c:
- break
- reads += c
- self.assertEqual(reads, self.normalized)
-
- def test_issue1395_2(self):
- txt = io.TextIOWrapper(io.BytesIO(self.testdata), encoding="ASCII")
- txt._CHUNK_SIZE = 4
-
- reads = ""
- while True:
- c = txt.read(4)
- if not c:
- break
- reads += c
- self.assertEqual(reads, self.normalized)
-
- def test_issue1395_3(self):
- txt = io.TextIOWrapper(io.BytesIO(self.testdata), encoding="ASCII")
- txt._CHUNK_SIZE = 4
-
- reads = txt.read(4)
- reads += txt.read(4)
- reads += txt.readline()
- reads += txt.readline()
- reads += txt.readline()
- self.assertEqual(reads, self.normalized)
-
- def test_issue1395_4(self):
- txt = io.TextIOWrapper(io.BytesIO(self.testdata), encoding="ASCII")
- txt._CHUNK_SIZE = 4
-
- reads = txt.read(4)
- reads += txt.read()
- self.assertEqual(reads, self.normalized)
-
- def test_issue1395_5(self):
- txt = io.TextIOWrapper(io.BytesIO(self.testdata), encoding="ASCII")
- txt._CHUNK_SIZE = 4
-
- reads = txt.read(4)
- pos = txt.tell()
- txt.seek(0)
- txt.seek(pos)
- self.assertEqual(txt.read(4), "BBB\n")
-
-
-
-def test_main():
- support.run_unittest(
- TextIOWrapperTest)
if __name__ == "__main__":
- test_main()
+ unittest.main()