def test_basic(self): sio = BytesIO(b'abcdef') with preserve_stream_pos(sio): sio.seek(4) self.assertEqual(sio.tell(), 0) sio.seek(5) with preserve_stream_pos(sio): sio.seek(0) self.assertEqual(sio.tell(), 5)
def test_basic(self): sio = BytesIO('abcdef') with preserve_stream_pos(sio): sio.seek(4) self.assertEqual(stream.tell(), 0) sio.seek(5) with preserve_stream_pos(sio): sio.seek(0) self.assertEqual(stream.tell(), 5)