def test_int64(self):
     values = [-(1 << 63), (1 << 63) - 1]
     res = [(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80),
            (0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F)]
     for i in range(0, len(values)):
         wxf_expr = WXFExprInteger(values[i])
         self.assertSequenceEqual(wxf_expr.to_bytes(), res[i])
 def test_bigint_as_int(self):
     value = 10**20
     with self.assertRaises(ValueError):
         WXFExprInteger(value)
 def test_int8(self):
     values = [0, 1, 127, -1, -128]
     res = [0, 1, 127, 255, 128]
     for i in range(0, len(values)):
         wxf_expr = WXFExprInteger(values[i])
         self.assertEqual(wxf_expr.to_bytes()[0], res[i])