Lines Matching refs:PyBytes_FromFormat
1038 PyBytes_FromFormat = pythonapi.PyBytes_FromFormat
1039 PyBytes_FromFormat.argtypes = (c_char_p,)
1040 PyBytes_FromFormat.restype = py_object
1043 self.assertEqual(PyBytes_FromFormat(b'format'),
1045 self.assertEqual(PyBytes_FromFormat(b'Hello %s !', b'world'),
1049 self.assertEqual(PyBytes_FromFormat(b'c=%c', c_int(0)),
1051 self.assertEqual(PyBytes_FromFormat(b'c=%c', c_int(ord('@'))),
1053 self.assertEqual(PyBytes_FromFormat(b'c=%c', c_int(255)),
1055 self.assertEqual(PyBytes_FromFormat(b'd=%d ld=%ld zd=%zd',
1059 self.assertEqual(PyBytes_FromFormat(b'd=%d ld=%ld zd=%zd',
1063 self.assertEqual(PyBytes_FromFormat(b'u=%u lu=%lu zu=%zu',
1067 self.assertEqual(PyBytes_FromFormat(b'i=%i', c_int(123)),
1069 self.assertEqual(PyBytes_FromFormat(b'i=%i', c_int(-123)),
1071 self.assertEqual(PyBytes_FromFormat(b'x=%x', c_int(0xabc)),
1087 self.assertEqual(PyBytes_FromFormat(b'ptr=%p', c_char_p(ptr)),
1089 self.assertEqual(PyBytes_FromFormat(b's=%s', c_char_p(b'cstr')),
1105 self.assertEqual(PyBytes_FromFormat(formatstr, ctypes_type(value)),
1109 self.assertEqual(PyBytes_FromFormat(b'%5s', b'a'),
1111 self.assertEqual(PyBytes_FromFormat(b'%.3s', b'abcdef'),
1115 self.assertEqual(PyBytes_FromFormat(b'%%'),
1117 self.assertEqual(PyBytes_FromFormat(b'[%%]'),
1119 self.assertEqual(PyBytes_FromFormat(b'%%%c', c_int(ord('_'))),
1121 self.assertEqual(PyBytes_FromFormat(b'%%s'),
1125 self.assertEqual(PyBytes_FromFormat(b'%'), b'%')
1126 self.assertEqual(PyBytes_FromFormat(b'x=%i y=%', c_int(2), c_int(3)),
1132 PyBytes_FromFormat, b'%c', c_int(-1))
1134 PyBytes_FromFormat, b'%c', c_int(256))
1137 self.assertEqual(PyBytes_FromFormat(b''),
1139 self.assertEqual(PyBytes_FromFormat(b'%s', b''),