Home
last modified time | relevance | path

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

123

/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/python/cpython3/Lib/test/
Dtest_array.py451 self.assertRaises(TypeError, a.tobytes, 42)
454 b.frombytes(a.tobytes())
455 c = array.array(self.typecode, bytearray(a.tobytes()))
992 expected = m.tobytes()
993 self.assertEqual(a.tobytes(), expected)
994 self.assertEqual(a.tobytes()[0], expected[0])
999 self.assertEqual(m.tobytes(), expected)
1001 self.assertEqual(m.tobytes(), expected)
1003 self.assertEqual(m.tobytes(), expected)
1005 self.assertEqual(m.tobytes(), expected)
[all …]
Dtest_buffer.py658 mem = exporter.tobytes()
729 x = nd.tobytes()
811 rep = result.tolist() if fmt else result.tobytes()
842 self.assertEqual(result.tobytes(), b)
874 self.assertEqual(contig.tobytes(), b)
941 rep = result.tolist() if fmt else result.tobytes()
983 lst = orig_ex.tobytes() # Issue 12834
2094 self.assertEqual(hash(nd), hash(nd.tobytes()))
2119 self.assertEqual(b, nd.tobytes())
2141 ndbytes = nd.tobytes()
[all …]
Dtest_file.py48 self.assertEqual(b'12', a.tobytes()[:n])
275 line = buf.tobytes()
Dtest_struct.py427 from_buf = writable_buf.tobytes()[:len(test_string)]
432 from_buf = writable_buf.tobytes()[:len(test_string)+10]
455 from_buf = writable_buf.tobytes()[:len(test_string)]
460 from_buf = writable_buf.tobytes()[:len(test_string)+10]
/external/fonttools/Tests/misc/
DxmlWriter_test.py7 linesep = tobytes(os.linesep)
119 linesep = tobytes(os.linesep) if nls is None else tobytes(nls)
/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/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))
DS_I_N_G_.py68 data = data + tobytes(self.baseGlyphName)
D_n_a_m_e.py292 _ = tobytes(name, encoding, errors="strict")
393 return tobytes(self.string, encoding=self.getEncoding(), errors=errors)
/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.rst220 .. method:: array.tobytes()
227 :meth:`tostring` is renamed to :meth:`tobytes` for clarity.
242 Deprecated alias for :meth:`tobytes`.
248 otherwise a :exc:`ValueError` is raised. Use ``array.tobytes().decode(enc)`` to

123