summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_io.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_io.py')
-rw-r--r--Lib/test/test_io.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index 7853705..3dae789 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -3788,6 +3788,14 @@ class TextIOWrapperTest(unittest.TestCase):
t.write('x')
t.tell()
+ def test_issue35928(self):
+ p = self.BufferedRWPair(self.BytesIO(b'foo\nbar\n'), self.BytesIO())
+ f = self.TextIOWrapper(p)
+ res = f.readline()
+ self.assertEqual(res, 'foo\n')
+ f.write(res)
+ self.assertEqual(res + f.readline(), 'foo\nbar\n')
+
class MemviewBytesIO(io.BytesIO):
'''A BytesIO object whose read method returns memoryviews