Home
last modified time | relevance | path

Searched refs:tobytes (Results 1 – 25 of 83) sorted by relevance

1234

/external/fonttools/Tests/ttLib/tables/
DT_S_I__1_test.py4 from fontTools.misc.py23 import unichr, tobytes
112 data = tobytes(content)
128 data = tobytes(content)
149 data = tobytes(foo_content + bar_content)
167 data = tobytes(ppgm_content + cvt_content)
/external/python/cpython2/Lib/ctypes/test/
Dtest_pickling.py31 self.assertEqual(memoryview(src).tobytes(),
32 memoryview(dst).tobytes())
49 self.assertEqual(memoryview(y).tobytes(),
50 memoryview(x).tobytes())
/external/python/cpython3/Lib/ctypes/test/
Dtest_pickling.py31 self.assertEqual(memoryview(src).tobytes(),
32 memoryview(dst).tobytes())
49 self.assertEqual(memoryview(y).tobytes(),
50 memoryview(x).tobytes())
/external/fonttools/Lib/fontTools/misc/
Dpy23.py124 def tobytes(s, encoding='ascii', errors='strict'): function
137 def tobytes(self): member in Tag
143 tostr = tobytes
165 def tobytes(self): member in Tag
171 return tobytes(joiner).join(tobytes(item) for item in iterable)
Dsstruct.py73 value = tobytes(value)
81 data = tobytes(data)
DtestTools.py34 xml += tobytes(xmlSnippet, 'utf-8')
36 xml += b"".join(tobytes(s, 'utf-8') for s in xmlSnippet)
DtextTools.py93 data = tobytes(data)
/external/protobuf/python/google/protobuf/internal/
Ddecoder.py196 tag_bytes = buffer[start:pos].tobytes()
324 float_bytes = buffer[pos:new_pos].tobytes()
368 double_bytes = buffer[pos:new_pos].tobytes()
423 (tag_bytes, buffer[value_start_pos:pos].tobytes()))
461 (tag_bytes, buffer[pos:new_pos].tobytes()))
499 (tag_bytes, buffer[value_start_pos:pos].tobytes()))
546 byte_str = memview.tobytes()
616 value.append(buffer[pos:new_pos].tobytes())
629 field_dict[key] = buffer[pos:new_pos].tobytes()
814 (MESSAGE_SET_ITEM_TAG, buffer[message_set_item_start:pos].tobytes()))
[all …]
/external/fonttools/Tests/misc/
DxmlWriter_test.py7 linesep = tobytes(os.linesep)
119 linesep = tobytes(os.linesep) if nls is None else tobytes(nls)
/external/python/cpython3/Lib/test/
Dtest_array.py452 self.assertRaises(TypeError, a.tobytes, 42)
455 b.frombytes(a.tobytes())
456 c = array.array(self.typecode, bytearray(a.tobytes()))
993 expected = m.tobytes()
994 self.assertEqual(a.tobytes(), expected)
995 self.assertEqual(a.tobytes()[0], expected[0])
1000 self.assertEqual(m.tobytes(), expected)
1002 self.assertEqual(m.tobytes(), expected)
1004 self.assertEqual(m.tobytes(), expected)
1006 self.assertEqual(m.tobytes(), expected)
[all …]
Dtest_buffer.py658 mem = exporter.tobytes()
729 x = nd.tobytes()
810 rep = result.tolist() if fmt else result.tobytes()
841 self.assertEqual(result.tobytes(), b)
873 self.assertEqual(contig.tobytes(), b)
896 contig_bytes = memoryview(result).tobytes()
899 contig_bytes = memoryview(result).tobytes(order=None)
902 contig_bytes = memoryview(result).tobytes(order='C')
917 contig_bytes = memoryview(result).tobytes(order='F')
932 contig_bytes = memoryview(result).tobytes(order='A')
[all …]
Dtest_picklebuffer.py31 self.assertEqual(m.tobytes(), expected.tobytes())
Dtest_file.py48 self.assertEqual(b'12', a.tobytes()[:n])
286 line = buf.tobytes()
/external/tensorflow/tensorflow/python/kernel_tests/
Dbitcast_op_test.py35 buff_after = memoryview(out).tobytes()
36 buff_before = memoryview(x).tobytes()
/external/python/cpython2/Lib/test/
Dtest_struct.py436 def test_pack_into(self, cls=bytearray, tobytes=str): argument
444 from_buf = tobytes(writable_buf)[:len(test_string)]
449 from_buf = tobytes(writable_buf)[:len(test_string)+10]
466 tobytes=array.array.tostring)
471 tobytes=memoryview.tobytes)
Dtest_buffer.py34 self.assertEqual(m.tobytes(), s)
/external/mesa3d/.gitlab-ci/tracie/
Dimage_checksum.py35 md5 = hashlib.md5(Image.open(args.imagefile).tobytes())
/external/fonttools/Lib/fontTools/ttLib/tables/
DT_S_I__1.py94 text = tobytes(self.glyphPrograms[name], encoding="utf-8")
110 text = tobytes(self.extraPrograms[name], encoding="utf-8")
DasciiTable.py22 self.data = tobytes("\n".join(lines[1:-1]))
DT_S_I_V_.py21 self.data = tobytes("\r".join(lines[1:-1]))
D_l_t_a_g.py46 dataList.append(tobytes(stringPool))
/external/fonttools/Lib/fontTools/ufoLib/
Dplistlib.py40 return loads(tobytes(data, encoding="utf-8"), use_builtin_types=False)
/external/fonttools/Tests/svgLib/path/
Dpath_test.py44 tmp.write(tobytes(SVG_DATA))
/external/python/cpython3/Lib/
Dbase64.py43 return memoryview(s).tobytes()
154 s = memoryview(s).tobytes()
282 b = memoryview(b).tobytes()
/external/python/cpython3/Doc/library/
Darray.rst216 .. method:: array.tobytes()
223 :meth:`tostring` is renamed to :meth:`tobytes` for clarity.
238 Deprecated alias for :meth:`tobytes`.
246 otherwise a :exc:`ValueError` is raised. Use ``array.tobytes().decode(enc)`` to

1234