/external/python/cpython3/Lib/test/ |
D | test_lzma.py | 2 from io import BytesIO, UnsupportedOperation, DEFAULT_BUFFER_SIZE 532 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f: 534 with LZMAFile(BytesIO(), "w") as f: 536 with LZMAFile(BytesIO(), "x") as f: 538 with LZMAFile(BytesIO(), "a") as f: 587 LZMAFile(BytesIO(COMPRESSED_XZ), (3, "x")) 589 LZMAFile(BytesIO(COMPRESSED_XZ), "") 591 LZMAFile(BytesIO(COMPRESSED_XZ), "xt") 593 LZMAFile(BytesIO(COMPRESSED_XZ), "x+") 595 LZMAFile(BytesIO(COMPRESSED_XZ), "rx") [all …]
|
D | test_uu.py | 32 super(FakeIO, self).__init__(io.BytesIO(), 61 inp = io.BytesIO(plaintext) 62 out = io.BytesIO() 65 inp = io.BytesIO(plaintext) 66 out = io.BytesIO() 69 inp = io.BytesIO(plaintext) 70 out = io.BytesIO() 78 inp = io.BytesIO(encodedtextwrapped(0o666, "t1", backtick=backtick)) 79 out = io.BytesIO() 82 inp = io.BytesIO( [all …]
|
D | test_aifc.py | 188 fout = aifc.open(io.BytesIO(), 'wb') 197 fout = aifc.open(io.BytesIO(), 'wb') 224 f = io.BytesIO() 244 f = io.BytesIO(b'\x00') 251 f = io.BytesIO() 260 b1 = io.BytesIO(b'WRNG' + struct.pack('>L', 0)) 261 b2 = io.BytesIO(b'FORM' + struct.pack('>L', 4) + b'WRNG') 266 b = io.BytesIO(b'FORM' + struct.pack('>L', 4) + b'AIFF') 276 aifc.open(io.BytesIO(b)) 283 self.assertRaises(aifc.Error, aifc.open, io.BytesIO(b)) [all …]
|
D | test_wave.py | 121 wave.open(io.BytesIO(b)) 127 wave.open(io.BytesIO(b)) 133 wave.open(io.BytesIO(b)) 139 wave.open(io.BytesIO(b)) 146 wave.open(io.BytesIO(b)) 152 wave.open(io.BytesIO(b)) 159 wave.open(io.BytesIO(b)) 166 wave.open(io.BytesIO(b)) 173 wave.open(io.BytesIO(b))
|
D | test_sunau.py | 131 sunau.open(io.BytesIO(b)) 134 sunau.open(io.BytesIO(b)) 140 sunau.open(io.BytesIO(b)) 147 sunau.open(io.BytesIO(b)) 152 sunau.open(io.BytesIO(b)) 158 sunau.open(io.BytesIO(b))
|
D | test_cgi.py | 9 from io import StringIO, BytesIO 43 fp = BytesIO(buf.encode('latin-1')) # FieldStorage expects bytes 112 fake_stdin = BytesIO(data.encode(encoding)) 125 fp = BytesIO(POSTDATA.encode('latin1')) 141 fp = BytesIO(POSTDATA.encode('utf8')) 258 fp = BytesIO(POSTDATA.encode('latin-1')) 277 fp = BytesIO(b"\r\n" + POSTDATA.encode('latin-1')) 295 fp = BytesIO(POSTDATA_NON_ASCII.encode(encoding)) 333 fp = BytesIO(POSTDATA_W3.encode('latin-1')) 360 fp = BytesIO(POSTDATA.encode('latin-1')) [all …]
|
D | test_sax.py | 18 from io import BytesIO, StringIO 149 self.check_parse(BytesIO(xml_bytes(self.data, encoding))) 154 self.check_parse(BytesIO(xml_bytes(self.data, encoding, None))) 160 self.check_parse(BytesIO(xml_bytes(self.data, 'utf-8-sig', 'utf-8'))) 165 self.check_parse(BytesIO(xml_bytes(self.data, 'utf-8-sig', None))) 171 self.check_parse(BytesIO(xml_bytes(self.data, 'iso-8859-1'))) 178 self.check_parse(BytesIO(xml_bytes(self.data, 'iso-8859-1', None))) 327 return BytesIO(b"This is a byte stream.") 754 ioclass = BytesIO 777 raw = BytesIO() [all …]
|
D | test_pickle.py | 48 f = io.BytesIO(buf) 59 f = io.BytesIO() 66 f = io.BytesIO(buf) 94 f = io.BytesIO() 103 f = io.BytesIO(buf) 125 f = io.BytesIO() 129 pickler = Pickler(io.BytesIO()) 156 unpickler = Unpickler(io.BytesIO(self.dumps('abc', proto))) 158 unpickler = Unpickler(io.BytesIO()) 238 unpickler = self.unpickler_class(io.BytesIO()) [all …]
|
D | test_io.py | 227 class CMockFileIO(MockFileIO, io.BytesIO): 230 class PyMockFileIO(MockFileIO, pyio.BytesIO): 247 class CMockUnseekableIO(MockUnseekableIO, io.BytesIO): 250 class PyMockUnseekableIO(MockUnseekableIO, pyio.BytesIO): 442 return self.BufferedRandom(self.BytesIO()) 465 (self.BytesIO, "rws"), (self.StringIO, "rws"), 583 f = self.BytesIO() 587 f = self.BytesIO(data) 710 check(self.BytesIO()) 837 self.BytesIO() [all …]
|
D | multibytecodec_support.py | 13 from io import BytesIO 177 istream = UTF8Reader(BytesIO(self.tstring[1])) 178 ostream = BytesIO() 197 istream = BytesIO(self.tstring[0]) 198 ostream = UTF8Writer(BytesIO()) 235 istream = self.reader(BytesIO(self.tstring[0])) 236 ostream = UTF8Writer(BytesIO()) 255 istream = UTF8Reader(BytesIO(self.tstring[1])) 256 ostream = self.writer(BytesIO()) 276 stream = BytesIO()
|
D | test_bz2.py | 5 from io import BytesIO, DEFAULT_BUFFER_SIZE 391 bz2f = BZ2File(BytesIO(self.DATA)) 400 bz2f = BZ2File(BytesIO(), "w") 407 src = BytesIO(self.DATA) 417 bz2f = BZ2File(BytesIO(self.DATA)) 426 bz2f = BZ2File(BytesIO(), "w") 434 bz2f = BZ2File(BytesIO(self.DATA)) 443 bz2f = BZ2File(BytesIO(), "w") 558 decomp = BZ2File(BytesIO(bomb)) 568 with BytesIO(self.DATA) as bio: [all …]
|
D | test_quopri.py | 154 infp = io.BytesIO(p) 155 outfp = io.BytesIO() 162 infp = io.BytesIO(e) 163 outfp = io.BytesIO()
|
/external/fonttools/Tests/misc/ |
D | xmlWriter_test.py | 13 writer = XMLWriter(BytesIO()) 18 writer = XMLWriter(BytesIO()) 24 writer = XMLWriter(BytesIO()) 30 writer = XMLWriter(BytesIO(), encoding="utf8") 36 writer = XMLWriter(BytesIO(), encoding="UTF-8") 42 writer = XMLWriter(BytesIO(), encoding="UTF8") 47 self.assertRaises(Exception, XMLWriter, BytesIO(), 51 writer = XMLWriter(BytesIO()) 56 writer = XMLWriter(BytesIO()) 68 writer = XMLWriter(BytesIO()) [all …]
|
/external/python/cpython2/Lib/test/ |
D | test_aifc.py | 145 fout = aifc.open(io.BytesIO(), 'wb') 172 f = io.BytesIO() 192 f = io.BytesIO('\x00') 199 f = io.BytesIO() 208 b1 = io.BytesIO('WRNG' + struct.pack('>L', 0)) 209 b2 = io.BytesIO('FORM' + struct.pack('>L', 4) + 'WRNG') 214 b = io.BytesIO('FORM' + struct.pack('>L', 4) + 'AIFF') 223 aifc.open(io.BytesIO(b)) 229 self.assertRaises(aifc.Error, aifc.open, io.BytesIO(b)) 237 f = aifc.open(io.BytesIO(b)) [all …]
|
D | test_io.py | 201 class CMockFileIO(MockFileIO, io.BytesIO): 204 class PyMockFileIO(MockFileIO, pyio.BytesIO): 416 f = self.BytesIO() 420 f = self.BytesIO(data) 1116 self.tp(io.BytesIO(), 1024, 1024, 1024) 1255 raw = io.BytesIO() 1428 self.tp(io.BytesIO(), 1024, 1024, 1024) 1478 pair = self.tp(self.BytesIO(b"abcdef"), self.MockRawIO()) 1483 pair = self.tp(self.BytesIO(b"abc"), self.MockRawIO()) 1487 pair = lambda: self.tp(self.BytesIO(b"abc\ndef\nh"), self.MockRawIO()) [all …]
|
/external/python/cpython3/Lib/encodings/ |
D | quopri_codec.py | 8 from io import BytesIO 12 f = BytesIO(input) 13 g = BytesIO() 19 f = BytesIO(input) 20 g = BytesIO()
|
D | uu_codec.py | 12 from io import BytesIO 18 infile = BytesIO(input) 19 outfile = BytesIO() 35 infile = BytesIO(input) 36 outfile = BytesIO()
|
/external/python/cpython3/Lib/ |
D | shelve.py | 60 from io import BytesIO 113 f = BytesIO(self.dict[key.encode(self.keyencoding)]) 122 f = BytesIO() 194 f = BytesIO(value) 199 f = BytesIO(value) 204 f = BytesIO(value) 209 f = BytesIO(value) 214 f = BytesIO(value)
|
D | quopri.py | 109 from io import BytesIO 110 infp = BytesIO(s) 111 outfp = BytesIO() 163 from io import BytesIO 164 infp = BytesIO(s) 165 outfp = BytesIO()
|
/external/tensorflow/tensorflow/contrib/checkpoint/python/ |
D | python_state.py | 28 from cStringIO import StringIO as BytesIO unknown 30 from io import BytesIO 142 string_file = BytesIO() 152 string_file = BytesIO(string_value)
|
/external/fonttools/Tests/ttLib/ |
D | woff2_test.py | 38 TT_WOFF2 = BytesIO() 39 CFF_WOFF2 = BytesIO() 63 cls.file = BytesIO(CFF_WOFF2.getvalue()) 72 WOFF2Reader(BytesIO(b"wOFF")) 77 WOFF2Reader(BytesIO(incomplete_header)) 85 WOFF2Reader(BytesIO(data + self.file.read())) 101 WOFF2Reader(BytesIO(data + self.file.read())) 133 cls.file = BytesIO(TT_WOFF2.getvalue()) 208 infile = BytesIO() 212 outfile = BytesIO() [all …]
|
/external/yapf/yapf/yapflib/ |
D | py3compat.py | 25 BytesIO = io.BytesIO variable 50 StringIO = BytesIO = cStringIO.StringIO
|
/external/scapy/test/tls/ |
D | travis_test_server.py | 19 from io import BytesIO, StringIO 32 new_out, new_err = (StringIO(), StringIO()) if six.PY3 else (BytesIO(), BytesIO())
|
/external/libchrome/third_party/jinja2/ |
D | _compat.py | 32 from io import BytesIO, StringIO 61 from cStringIO import StringIO as BytesIO, StringIO unknown 62 NativeStringIO = BytesIO
|
/external/fonttools/Lib/fontTools/ttLib/tables/ |
D | C_F_F__2.py | 10 self.cff.decompile(BytesIO(data), otFont, isCFF2=True) 14 f = BytesIO()
|