correct range for i8 (64 bit signed)

This commit is contained in:
Mike McLean 2017-08-24 22:42:53 -04:00
parent 2dfbd7d998
commit cea43dd458
2 changed files with 5 additions and 5 deletions

View file

@ -30,8 +30,8 @@ class ExtendedMarshaller(xmlrpc_client.Marshaller):
write("</data></array></value>\n")
dispatch[types.GeneratorType] = dump_generator
MAXI8 = 2 ** 64 - 1
MINI8 = -2 ** 64
MAXI8 = 2 ** 63 - 1
MINI8 = -2 ** 63
def dump_int(self, value, write):
# python2's xmlrpclib doesn't support i8 extension for marshalling,

View file

@ -67,10 +67,10 @@ class TestDump(unittest.TestCase):
self.assertEqual(method, None)
long_data = [
2 ** 63,
2 ** 63 - 1,
-(2 ** 63),
[2**n - 1 for n in range(65)],
{"a": [2 ** 63, 5], "b": 2**63+42},
[2**n - 1 for n in range(64)],
{"a": [2 ** 63 - 23, 5], "b": 2**63 - 42},
]
def test_i8(self):