Home
last modified time | relevance | path

Searched refs:readinto (Results 1 – 25 of 63) sorted by relevance

123

/external/python/cpython2/Lib/test/
Dtest_file.py52 n = self.f.readinto(a)
61 self.assertRaises(TypeError, self.f.readinto, a)
96 self.assertRaises((IOError, TypeError), f.readinto, "")
277 f.readinto(buf)
311 f.readinto(buf)
Dtest_fileio.py72 n = self.f.readinto(a)
122 self.assertRaises(TypeError, f.readinto, "")
142 self.assertRaises(ValueError, self.f.readinto) # XXX should be TypeError?
143 self.assertRaises(ValueError, self.f.readinto, bytearray(1))
270 f.readinto(a)
Dtest_memoryio.py422 self.assertEqual(memio.readinto(b), 5)
424 self.assertEqual(memio.readinto(b), 5)
426 self.assertEqual(memio.readinto(b), 0)
430 self.assertEqual(memio.readinto(b), 10)
434 self.assertEqual(memio.readinto(b), 0)
436 self.assertRaises(TypeError, memio.readinto, '')
440 memio.readinto(a)
443 self.assertRaises(ValueError, memio.readinto, b)
447 memio.readinto(b)
Dtest_file2k.py64 n = self.f.readinto(a)
119 self.assertRaises(TypeError, f.readinto, "")
182 self.assertRaises(IOError, self.f.readinto, bytearray(len(data)))
389 f.readinto(buf)
422 f.readinto(buf)
617 self.f.readinto(a)
Dtest_io.py98 def readinto(self, buf): member in MockRawIOWithoutRead
159 def readinto(self, buf): member in MisbehavedRawIO
160 MockRawIO.readinto(self, buf)
196 def readinto(self, b): member in MockFileIO
197 res = super(MockFileIO, self).readinto(b)
295 self.assertEqual(f.readinto(data), 5)
298 self.assertEqual(f.readinto(data), 2)
304 self.assertEqual(f.readinto(byteslike(b"x")), 0)
308 self.assertEqual(f.readinto(byteslike()), 0)
690 self.assertEqual(stream.readinto(buffer), 5)
[all …]
/external/python/cpython3/Lib/test/
Dtest_fileio.py82 n = f.readinto(ba)
92 n = f.readinto(m)
98 n = f.readinto(m)
108 n = f.readinto(a)
114 n = f.readinto(a)
120 n = f.readinto(a)
194 self.assertRaises(TypeError, f.readinto, "")
212 self.assertRaises(TypeError, self.f.readinto)
213 self.assertRaises(ValueError, self.f.readinto, bytearray(1))
340 f.readinto(a)
Dtest_file.py47 n = self.f.readinto(a)
56 self.assertRaises(TypeError, self.f.readinto, a)
91 self.assertRaises((OSError, TypeError), f.readinto, "")
282 f.readinto(buf)
317 f.readinto(buf)
Dtest_httplib.py582 n = resp.readinto(b)
586 n = resp.readinto(b)
618 n = resp.readinto(b)
622 n = resp.readinto(b)
625 n = resp.readinto(b)
650 n = resp.readinto(b)
654 n = resp.readinto(b)
657 n = resp.readinto(b)
723 if resp.readinto(b) != 0:
872 n = resp.readinto(b)
[all …]
Dtest_memoryio.py476 self.assertEqual(memio.readinto(b), 5)
478 self.assertEqual(memio.readinto(b), 5)
480 self.assertEqual(memio.readinto(b), 0)
484 self.assertEqual(memio.readinto(b), 10)
488 self.assertEqual(memio.readinto(b), 0)
490 self.assertRaises(TypeError, memio.readinto, '')
494 memio.readinto(a)
497 self.assertRaises(ValueError, memio.readinto, b)
501 memio.readinto(b)
Dtest_io.py115 def readinto(self, buf): member in MockRawIOWithoutRead
176 def readinto(self, buf): member in MisbehavedRawIO
177 super().readinto(buf)
229 def readinto(self, b): member in MockFileIO
230 res = super().readinto(b)
352 self.assertEqual(f.readinto(data), 5)
355 self.assertEqual(f.readinto(data), 2)
361 self.assertEqual(f.readinto(byteslike(b"x")), 0)
365 self.assertEqual(f.readinto(byteslike()), 0)
744 self.assertRaises(ValueError, file.readinto, bytearray(1))
[all …]
Dtest_marshal.py313 def readinto(self, buf): member in BugsTestCase.test_bad_reader.BadReader
314 n = super().readinto(buf)
/external/python/cpython2/Tools/freeze/
Dbkfile.py24 self.readinto = self.__file.readinto
/external/python/pybind11/tests/
Dtest_buffers.py105 io.BytesIO(b"A").readinto(buf)
112 io.BytesIO(b"1").readinto(buf)
/external/python/cpython3/Lib/
Dbz2.py186 def readinto(self, b): member in BZ2File
193 return self._buffer.readinto(b)
D_pyio.py633 n = self.readinto(b)
653 def readinto(self, b): member in RawIOBase
717 def readinto(self, b): member in BufferedIOBase
1194 n = self.raw.readinto(buf[written:])
1364 def readinto(self, b): member in BufferedRWPair
1365 return self.reader.readinto(b)
1451 def readinto(self, b): member in BufferedRandom
1453 return BufferedReader.readinto(self, b)
1689 def readinto(self, b): member in FileIO
D_compression.py66 def readinto(self, b): member in DecompressReader
Dpickle.py270 def readinto(self, buf): member in _Unframer
272 n = self.current_frame.readinto(buf)
1198 self.readinto = self._unframer.readinto
1391 self.readinto(b)
/external/python/cpython2/Lib/
D_pyio.py561 n = self.readinto(b)
581 def readinto(self, b): member in RawIOBase
642 def readinto(self, b): member in BufferedIOBase
1197 def readinto(self, b): member in BufferedRWPair
1198 return self.reader.readinto(b)
1284 def readinto(self, b): member in BufferedRandom
1286 return BufferedReader.readinto(self, b)
/external/python/cpython3/Doc/library/
Dio.rst188 :meth:`~IOBase.readinto` and :meth:`~IOBase.readline`.
228 :class:`RawIOBase` :class:`IOBase` ``readinto`` and Inherited :class:`IOBase` …
230 …` :class:`IOBase` ``detach``, ``read``, Inherited :class:`IOBase` methods, ``readinto``,
418 :meth:`readinto`.
425 .. method:: readinto(b)
452 :meth:`readinto` and :meth:`write` will try (respectively) to read as much
462 implementation that defers to :meth:`readinto`.
509 :meth:`~RawIOBase.readinto`) method. This can be useful if you are
516 .. method:: readinto(b)
533 :meth:`~RawIOBase.readinto`) method. Return the number of bytes read.
[all …]
/external/python/cpython3/Modules/_io/
Dwinconsoleio.c649 readinto(winconsoleio *self, char *buf, Py_ssize_t len) in readinto() function
752 Py_ssize_t len = readinto(self, buffer->buf, buffer->len); in _io__WindowsConsoleIO_readinto_impl()
934 bytes_size = readinto(self, PyBytes_AS_STRING(bytes), PyBytes_GET_SIZE(bytes)); in _io__WindowsConsoleIO_read_impl()
/external/python/cpython3/Lib/http/
Dclient.py458 n = self.readinto(b)
479 def readinto(self, b): member in HTTPResponse
502 n = self.fp.readinto(b)
620 n = self.fp.readinto(b)
/external/python/cpython2/Misc/NEWS.d/
D2.7.1.rst131 Fix BytesIO.readinto() after seeking into a position after the end of the
/external/python/cpython2/Doc/library/
Dio.rst221 Even though :class:`IOBase` does not declare :meth:`read`, :meth:`readinto`,
230 In some cases, such as :meth:`~RawIOBase.readinto`, a writable object
389 .. method:: readinto(b)
417 :meth:`readinto` and :meth:`write` will try (respectively) to read as much
427 implementation that defers to :meth:`readinto`.
477 .. method:: readinto(b)
527 The :meth:`read` (when called with a positive argument), :meth:`readinto`
685 and line based interface to stream I/O. There is no :meth:`readinto`
Dgzip.rst31 of a file object, with the exception of the :meth:`readinto` and
/external/pdfium/testing/tools/
Dencode_pdf_filter.py233 data_length = in_buffer.readinto(data)

123