[pypy-commit] pypy default: Skip the overflowing half of the test if by chance it is run with (sys.maxint, 1)
arigo
pypy.commits at gmail.com
Thu Jul 28 04:19:28 EDT 2016
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r85887:8e0dfa001b92
Date: 2016-07-28 10:18 +0200
http://bitbucket.org/pypy/pypy/changeset/8e0dfa001b92/
Log: Skip the overflowing half of the test if by chance it is run with
(sys.maxint, 1)
diff --git a/rpython/rlib/test/test_rarithmetic.py b/rpython/rlib/test/test_rarithmetic.py
--- a/rpython/rlib/test/test_rarithmetic.py
+++ b/rpython/rlib/test/test_rarithmetic.py
@@ -404,6 +404,8 @@
def test_int_c_div_mod(x, y):
assert int_c_div(~x, y) == -(abs(~x) // y)
assert int_c_div( x,-y) == -(x // y)
+ if (x, y) == (sys.maxint, 1):
+ py.test.skip("would overflow")
assert int_c_div(~x,-y) == +(abs(~x) // y)
for x1 in [x, ~x]:
for y1 in [y, -y]:
More information about the pypy-commit
mailing list