mirror of
https://github.com/python/cpython.git
synced 2025-08-09 03:19:15 +00:00
[3.12] gh-115059: Remove debugging code in test_io (GH-115240) (GH-115244)
(cherry picked from commit 597fad07f7
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
7cc205872d
commit
a5f49ce65e
1 changed files with 0 additions and 30 deletions
|
@ -2540,36 +2540,6 @@ class BufferedRandomTest(BufferedReaderTest, BufferedWriterTest):
|
||||||
f.flush()
|
f.flush()
|
||||||
self.assertEqual(raw.getvalue(), b'1b\n2def\n3\n')
|
self.assertEqual(raw.getvalue(), b'1b\n2def\n3\n')
|
||||||
|
|
||||||
def test_xxx(self):
|
|
||||||
with self.BytesIO(b'abcdefgh') as raw:
|
|
||||||
with self.tp(raw) as f:
|
|
||||||
f.write(b'123')
|
|
||||||
self.assertEqual(f.read(), b'defgh')
|
|
||||||
f.write(b'456')
|
|
||||||
f.flush()
|
|
||||||
self.assertEqual(raw.getvalue(), b'123defgh456')
|
|
||||||
with self.BytesIO(b'abcdefgh') as raw:
|
|
||||||
with self.tp(raw) as f:
|
|
||||||
f.write(b'123')
|
|
||||||
self.assertEqual(f.read(3), b'def')
|
|
||||||
f.write(b'456')
|
|
||||||
f.flush()
|
|
||||||
self.assertEqual(raw.getvalue(), b'123def456')
|
|
||||||
with self.BytesIO(b'abcdefgh') as raw:
|
|
||||||
with self.tp(raw) as f:
|
|
||||||
f.write(b'123')
|
|
||||||
self.assertEqual(f.read1(), b'defgh')
|
|
||||||
f.write(b'456')
|
|
||||||
f.flush()
|
|
||||||
self.assertEqual(raw.getvalue(), b'123defgh456')
|
|
||||||
with self.BytesIO(b'abcdefgh') as raw:
|
|
||||||
with self.tp(raw) as f:
|
|
||||||
f.write(b'123')
|
|
||||||
self.assertEqual(f.read1(3), b'def')
|
|
||||||
f.write(b'456')
|
|
||||||
f.flush()
|
|
||||||
self.assertEqual(raw.getvalue(), b'123def456')
|
|
||||||
|
|
||||||
# You can't construct a BufferedRandom over a non-seekable stream.
|
# You can't construct a BufferedRandom over a non-seekable stream.
|
||||||
test_unseekable = None
|
test_unseekable = None
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue