Home
last modified time | relevance | path

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

12345

/external/python/cryptography/tests/hazmat/
Dtest_der.py23 assert reader.read_bytes(1).tobytes() == b"2"
24 assert reader.read_bytes(4).tobytes() == b"3456"
29 assert reader.read_bytes(3).tobytes() == b"789"
65 assert outer.data.tobytes() == der[2:]
72 assert outer2.data.tobytes() == der[2:]
76 assert outer3.data.tobytes() == der[2:]
97 assert octet_string.data.tobytes() == b"hello"
141 assert element.data.tobytes() == body
/external/fonttools/Lib/fontTools/misc/
DtextTools.py31 def tobytes(self): member in Tag
114 data = tobytes(data)
129 def tobytes(s, encoding="ascii", errors="strict"): function
149 return tobytes(joiner).join(tobytes(item) for item in iterable)
Dsstruct.py50 from fontTools.misc.textTools import tobytes, tostr
72 value = tobytes(value)
80 data = tobytes(data)
DtestTools.py12 from fontTools.misc.textTools import tobytes
32 xml += tobytes(xmlSnippet, 'utf-8')
34 xml += b"".join(tobytes(s, 'utf-8') for s in xmlSnippet)
/external/fonttools/Tests/ttLib/tables/
DT_S_I__1_test.py2 from fontTools.misc.textTools import tobytes
109 data = tobytes(content)
125 data = tobytes(content)
146 data = tobytes(foo_content + bar_content)
164 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/tensorflow/tensorflow/python/kernel_tests/image_ops/
Ddecode_raw_op_test.py84 result, parsing_ops.decode_raw([result.tobytes()], dtypes.float16))
89 parsing_ops.decode_raw([result.tobytes()], dtypes.bool))
94 result, parsing_ops.decode_raw([result.tobytes()], dtypes.complex64))
99 result, parsing_ops.decode_raw([result.tobytes()], dtypes.complex128))
/external/protobuf/python/google/protobuf/internal/
Ddecoder.py178 tag_bytes = buffer[start:pos].tobytes()
310 float_bytes = buffer[pos:new_pos].tobytes()
354 double_bytes = buffer[pos:new_pos].tobytes()
411 (tag_bytes, buffer[value_start_pos:pos].tobytes()))
456 (tag_bytes, buffer[pos:new_pos].tobytes()))
501 (tag_bytes, buffer[value_start_pos:pos].tobytes()))
551 byte_str = memview.tobytes()
616 value.append(buffer[pos:new_pos].tobytes())
632 field_dict[key] = buffer[pos:new_pos].tobytes()
821 (MESSAGE_SET_ITEM_TAG, buffer[message_set_item_start:pos].tobytes()))
[all …]
/external/cronet/third_party/protobuf/python/google/protobuf/internal/
Ddecoder.py178 tag_bytes = buffer[start:pos].tobytes()
310 float_bytes = buffer[pos:new_pos].tobytes()
354 double_bytes = buffer[pos:new_pos].tobytes()
411 (tag_bytes, buffer[value_start_pos:pos].tobytes()))
456 (tag_bytes, buffer[pos:new_pos].tobytes()))
501 (tag_bytes, buffer[value_start_pos:pos].tobytes()))
551 byte_str = memview.tobytes()
616 value.append(buffer[pos:new_pos].tobytes())
632 field_dict[key] = buffer[pos:new_pos].tobytes()
821 (MESSAGE_SET_ITEM_TAG, buffer[message_set_item_start:pos].tobytes()))
[all …]
/external/fonttools/Lib/fontTools/ttLib/tables/
DT_S_I_V_.py1 from fontTools.misc.textTools import strjoin, tobytes, tostr
20 self.data = tobytes("\r".join(lines[1:-1]))
DasciiTable.py1 from fontTools.misc.textTools import strjoin, tobytes, tostr
21 self.data = tobytes("\n".join(lines[1:-1]))
DT_S_I__1.py9 from fontTools.misc.textTools import strjoin, tobytes, tostr
93 text = tobytes(self.glyphPrograms[name], encoding="utf-8")
109 text = tobytes(self.extraPrograms[name], encoding="utf-8")
DG__l_o_c.py44 data += self.locations.tobytes()
48 data += self.attribIds.tobytes()
D_l_t_a_g.py1 from fontTools.misc.textTools import bytesjoin, tobytes, safeEval
44 dataList.append(tobytes(stringPool))
D_p_o_s_t.py4 from fontTools.misc.textTools import bytechr, byteord, tobytes, tostr, safeEval, readHex
176 return struct.pack(">H", numGlyphs) + indices.tobytes() + packPStrings(extraNames)
193 return indices.tobytes()
291 data = data + bytechr(len(s)) + tobytes(s, encoding="latin1")
DS_I_N_G_.py2 from fontTools.misc.textTools import bytechr, byteord, tobytes, tostr, safeEval
66 data = data + tobytes(self.baseGlyphName)
/external/fonttools/Tests/svgLib/path/
Dpath_test.py1 from fontTools.misc.textTools import tobytes
42 tmp.write(tobytes(SVG_DATA))
/external/fonttools/Lib/fontTools/ufoLib/
Dplistlib.py6 from fontTools.misc.textTools import tobytes
41 return loads(tobytes(data, encoding="utf-8"), use_builtin_types=False)
/external/fonttools/Tests/misc/
DxmlWriter_test.py4 from fontTools.misc.textTools import bytesjoin, tobytes
118 linesep = tobytes(os.linesep) if nls is None else tobytes(nls)
/external/python/cryptography/src/cryptography/hazmat/primitives/serialization/
Dssh.py200 def tobytes(self): member in _FragList
204 return buf.tobytes()
361 self.curve, point.tobytes()
411 point.tobytes()
462 key_type = memoryview(key_type).tobytes()
505 ciphername = ciphername.tobytes()
516 ciphername, password, salt.tobytes(), rounds, backend
682 pub = binascii.b2a_base64(f_pub.tobytes()).strip()
/external/python/cpython3/Lib/test/
Dtest_array.py511 self.assertRaises(TypeError, a.tobytes, 42)
514 b.frombytes(a.tobytes())
515 c = array.array(self.typecode, bytearray(a.tobytes()))
1063 expected = m.tobytes()
1064 self.assertEqual(a.tobytes(), expected)
1065 self.assertEqual(a.tobytes()[0], expected[0])
1070 self.assertEqual(m.tobytes(), expected)
1072 self.assertEqual(m.tobytes(), expected)
1074 self.assertEqual(m.tobytes(), expected)
1076 self.assertEqual(m.tobytes(), expected)
[all …]
Dtest_buffer.py666 mem = exporter.tobytes()
737 x = nd.tobytes()
818 rep = result.tolist() if fmt else result.tobytes()
849 self.assertEqual(result.tobytes(), b)
881 self.assertEqual(contig.tobytes(), b)
904 contig_bytes = memoryview(result).tobytes()
907 contig_bytes = memoryview(result).tobytes(order=None)
910 contig_bytes = memoryview(result).tobytes(order='C')
925 contig_bytes = memoryview(result).tobytes(order='F')
940 contig_bytes = memoryview(result).tobytes(order='A')
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/array_ops/
Dbitcast_op_test.py34 buff_after = memoryview(out).tobytes()
35 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)

12345