Home | History | Annotate | Download | only in test

Lines Matching refs:from_bytes

1189                         int.from_bytes(test, byteorder, signed=signed),
1283 self.assertIs(type(myint.from_bytes(b'\x00', 'big')), myint)
1284 self.assertEqual(myint.from_bytes(b'\x01', 'big'), 1)
1286 type(myint.from_bytes(b'\x00', 'big', signed=False)), myint)
1287 self.assertEqual(myint.from_bytes(b'\x01', 'big', signed=False), 1)
1288 self.assertIs(type(myint.from_bytes(b'\x00', 'little')), myint)
1289 self.assertEqual(myint.from_bytes(b'\x01', 'little'), 1)
1290 self.assertIs(type(myint.from_bytes(
1292 self.assertEqual(myint.from_bytes(b'\x01', 'little', signed=False), 1)
1294 int.from_bytes([255, 0, 0], 'big', signed=True), -65536)
1296 int.from_bytes((255, 0, 0), 'big', signed=True), -65536)
1297 self.assertEqual(int.from_bytes(
1299 self.assertEqual(int.from_bytes(
1301 self.assertEqual(int.from_bytes(
1303 self.assertEqual(int.from_bytes(
1305 self.assertRaises(ValueError, int.from_bytes, [256], 'big')
1306 self.assertRaises(ValueError, int.from_bytes, [0], 'big\x00')
1307 self.assertRaises(ValueError, int.from_bytes, [0], 'little\x00')
1308 self.assertRaises(TypeError, int.from_bytes, "", 'big')
1309 self.assertRaises(TypeError, int.from_bytes, "\x00", 'big')
1310 self.assertRaises(TypeError, int.from_bytes, 0, 'big')
1311 self.assertRaises(TypeError, int.from_bytes, 0, 'big', True)
1312 self.assertRaises(TypeError, myint.from_bytes, "", 'big')
1313 self.assertRaises(TypeError, myint.from_bytes, "\x00", 'big')
1314 self.assertRaises(TypeError, myint.from_bytes, 0, 'big')
1315 self.assertRaises(TypeError, int.from_bytes, 0, 'big', True)
1321 i = myint2.from_bytes(b'\x01', 'big')
1329 i = myint3.from_bytes(b'\x01', 'big')