Commit b48cf655 authored by Stefan Behnel's avatar Stefan Behnel

Fix tests in Py2.

parent 2c823b74
......@@ -176,7 +176,10 @@ def add0(x):
(1, 1)
>>> add0(-1)
(-1, -1)
>>> add0(2**32)
(4294967296, 4294967296)
>>> a, b = add0(2**32)
>>> bigint(a)
4294967296
>>> bigint(b)
4294967296
"""
return x + 0, 0 + x
......@@ -203,9 +203,15 @@ def sub0(x):
(-1, 1)
>>> sub0(99)
(99, -99)
>>> sub0(2**32)
(4294967296, -4294967296)
>>> sub0(-2**32)
(-4294967296, 4294967296)
>>> a, b = sub0(2**32)
>>> bigint(a)
4294967296
>>> bigint(b)
-4294967296
>>> a, b = sub0(-2**32)
>>> bigint(a)
-4294967296
>>> bigint(b)
4294967296
"""
return x - 0, 0 - x
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment