Commit aaed2c33 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-26423: Fix test_descr.test_wrap_lenfunc_bad_cast() on 32-bit Windows (GH-13629)

Skip the test if xrange(sys.maxsize) raises an OverflowError.
parent 80dfe990
......@@ -404,7 +404,11 @@ class OperatorsTest(unittest.TestCase):
self.assertEqual(a.getstate(), 100)
def test_wrap_lenfunc_bad_cast(self):
self.assertEqual(xrange(sys.maxsize).__len__(), sys.maxsize)
try:
large_range = xrange(sys.maxsize)
except OverflowError as exc:
self.skipTest("xrange(sys.maxsize) failed with: %s" % exc)
self.assertEqual(large_range.__len__(), sys.maxsize)
class ClassPropertiesAndMethods(unittest.TestCase):
......
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