• Home
  • Raw
  • Download

Lines Matching refs:from_bytes

1197                         int.from_bytes(test, byteorder, signed=signed),
1291 self.assertIs(type(myint.from_bytes(b'\x00', 'big')), myint)
1292 self.assertEqual(myint.from_bytes(b'\x01', 'big'), 1)
1294 type(myint.from_bytes(b'\x00', 'big', signed=False)), myint)
1295 self.assertEqual(myint.from_bytes(b'\x01', 'big', signed=False), 1)
1296 self.assertIs(type(myint.from_bytes(b'\x00', 'little')), myint)
1297 self.assertEqual(myint.from_bytes(b'\x01', 'little'), 1)
1298 self.assertIs(type(myint.from_bytes(
1300 self.assertEqual(myint.from_bytes(b'\x01', 'little', signed=False), 1)
1302 int.from_bytes([255, 0, 0], 'big', signed=True), -65536)
1304 int.from_bytes((255, 0, 0), 'big', signed=True), -65536)
1305 self.assertEqual(int.from_bytes(
1307 self.assertEqual(int.from_bytes(
1309 self.assertEqual(int.from_bytes(
1311 self.assertEqual(int.from_bytes(
1313 self.assertRaises(ValueError, int.from_bytes, [256], 'big')
1314 self.assertRaises(ValueError, int.from_bytes, [0], 'big\x00')
1315 self.assertRaises(ValueError, int.from_bytes, [0], 'little\x00')
1316 self.assertRaises(TypeError, int.from_bytes, "", 'big')
1317 self.assertRaises(TypeError, int.from_bytes, "\x00", 'big')
1318 self.assertRaises(TypeError, int.from_bytes, 0, 'big')
1319 self.assertRaises(TypeError, int.from_bytes, 0, 'big', True)
1320 self.assertRaises(TypeError, myint.from_bytes, "", 'big')
1321 self.assertRaises(TypeError, myint.from_bytes, "\x00", 'big')
1322 self.assertRaises(TypeError, myint.from_bytes, 0, 'big')
1323 self.assertRaises(TypeError, int.from_bytes, 0, 'big', True)
1329 i = myint2.from_bytes(b'\x01', 'big')
1337 i = myint3.from_bytes(b'\x01', 'big')