Home
last modified time | relevance | path

Searched refs:BytesIO (Results 1 – 25 of 29) sorted by relevance

12

/external/python/cpython2/Lib/test/
Dtest_aifc.py133 fout = aifc.open(io.BytesIO(), 'wb')
160 f = io.BytesIO()
180 f = io.BytesIO('\x00')
187 f = io.BytesIO()
196 b1 = io.BytesIO('WRNG' + struct.pack('>L', 0))
197 b2 = io.BytesIO('FORM' + struct.pack('>L', 4) + 'WRNG')
202 b = io.BytesIO('FORM' + struct.pack('>L', 4) + 'AIFF')
209 self.assertRaises(aifc.Error, aifc.open, io.BytesIO(b))
217 f = aifc.open(io.BytesIO(b))
228 f = aifc.open(io.BytesIO(b))
[all …]
Dtest_io.py201 class CMockFileIO(MockFileIO, io.BytesIO):
204 class PyMockFileIO(MockFileIO, pyio.BytesIO):
400 f = self.BytesIO()
404 f = self.BytesIO(data)
1089 self.tp(io.BytesIO(), 1024, 1024, 1024)
1228 raw = io.BytesIO()
1399 self.tp(io.BytesIO(), 1024, 1024, 1024)
1449 pair = self.tp(self.BytesIO(b"abcdef"), self.MockRawIO())
1454 pair = self.tp(self.BytesIO(b"abc"), self.MockRawIO())
1458 pair = lambda: self.tp(self.BytesIO(b"abc\ndef\nh"), self.MockRawIO())
[all …]
Dtest_zipfile.py353 with io.BytesIO(zipfiledata) as bio, zipfile.ZipFile(bio) as zipfp:
358 with io.BytesIO() as bio:
372 with io.BytesIO() as bio:
388 with io.BytesIO(zipfiledata) as bio, zipfile.ZipFile(bio) as zipfp:
995 fp = io.BytesIO()
1003 fp = io.BytesIO(zipfiledata[:N])
1114 with zipfile.ZipFile(io.BytesIO(data), 'r') as zipf:
1187 with zipfile.ZipFile(io.BytesIO(zipdata), mode="r") as zipf:
1203 with zipfile.ZipFile(io.BytesIO(zipdata), mode="r") as zipf:
1207 with zipfile.ZipFile(io.BytesIO(zipdata), mode="r") as zipf:
[all …]
Dtest_sax.py130 self.check_parse(io.BytesIO(xml_bytes(self.data, encoding)))
135 self.check_parse(io.BytesIO(xml_bytes(self.data, encoding, None)))
141 self.check_parse(io.BytesIO(xml_bytes(self.data, 'utf-8-sig', 'utf-8')))
146 self.check_parse(io.BytesIO(xml_bytes(self.data, 'utf-8-sig', None)))
152 self.check_parse(io.BytesIO(xml_bytes(self.data, 'iso-8859-1')))
159 self.check_parse(io.BytesIO(xml_bytes(self.data, 'iso-8859-1', None)))
287 return io.BytesIO(b"This is a byte stream.")
605 ioclass = io.BytesIO
Dtest_memoryio.py406 ioclass = pyio.BytesIO
663 ioclass = io.BytesIO
704 self.assertEqual(object.__sizeof__(io.BytesIO()), basesize)
705 check(io.BytesIO(), basesize )
706 check(io.BytesIO(b'a'), basesize + 1 + 1 )
707 check(io.BytesIO(b'a' * 1000), basesize + 1000 + 1 )
Dtest_imghdr.py97 stream = io.BytesIO(self.testdata)
Dtest_cpickle.py20 output = input = io.BytesIO
Dtest_urllib.py26 class FakeSocket(io.BytesIO):
37 return io.BytesIO.read(self, amt)
42 return io.BytesIO.readline(self, length)
Dtest_gzip.py339 with gzip.GzipFile(fileobj=io.BytesIO(gzdata)) as f:
Dtest_memoryview.py244 i = io.BytesIO(b'ZZZZ')
Dtest_uuid.py410 return io.BytesIO(data)
Dpickletester.py1899 f = io.BufferedRandom(io.BytesIO(), buffer_size=buf_size)
/external/libmojo/third_party/jinja2/
D_compat.py31 from io import BytesIO, StringIO
60 from cStringIO import StringIO as BytesIO, StringIO unknown
61 NativeStringIO = BytesIO
Dbccache.py24 from jinja2._compat import BytesIO, pickle, PY2, text_type
100 self.load_bytecode(BytesIO(string))
104 out = BytesIO()
/external/python/cpython2/Lib/
Dio.py55 open, FileIO, BytesIO, StringIO, BufferedReader,
84 for klass in (BytesIO, BufferedReader, BufferedWriter, BufferedRandom,
D_pyio.py792 class BytesIO(BufferedIOBase): class
1998 super(StringIO, self).__init__(BytesIO(),
/external/python/cpython2/Tools/scripts/
Dpindent.py352 input = io.BytesIO(source)
353 output = io.BytesIO()
360 input = io.BytesIO(source)
361 output = io.BytesIO()
368 input = io.BytesIO(source)
369 output = io.BytesIO()
/external/fonttools/Lib/fontTools/misc/
Dpy23.py29 from io import BytesIO as StringIO
/external/autotest/client/common_lib/cros/
Davahi_utils.py44 conf.readfp(io.BytesIO(existing_config))
/external/mesa3d/src/gallium/drivers/swr/rasterizer/scripts/mako/
Dcompat.py21 from io import BytesIO as byte_buffer
/external/python/cpython2/Doc/library/
Dio.rst44 streams. :class:`BytesIO` is a simple stream of in-memory bytes.
184 and for :class:`bytes` a :class:`BytesIO` can be used like a
449 Some buffers, like :class:`BytesIO`, do not have the concept of a single
550 .. class:: BytesIO([initial_bytes])
558 :class:`BytesIO` provides or overrides these methods in addition to those
567 In :class:`BytesIO`, this is the same as :meth:`read`.
906 exhibit similar speed to :class:`BytesIO`.
Dconfigparser.rst546 >>> config.readfp(io.BytesIO(sample_config))
/external/clang/utils/check_cfc/
Dcheck_cfc.py322 config.readfp(io.BytesIO(default_config))
/external/protobuf/python/google/protobuf/internal/
Dpython_message.py53 from io import BytesIO
1061 out = BytesIO()
/external/protobuf/python/google/protobuf/
Dtext_format.py83 self._writer = io.BytesIO()

12