diff options
Diffstat (limited to 'Lib/test/seq_tests.py')
-rw-r--r-- | Lib/test/seq_tests.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Lib/test/seq_tests.py b/Lib/test/seq_tests.py index 962cfe1..5148d4b 100644 --- a/Lib/test/seq_tests.py +++ b/Lib/test/seq_tests.py @@ -304,11 +304,13 @@ class CommonTest(unittest.TestCase): self.assertEqual(id(s), id(s*1)) def test_bigrepeat(self): - x = self.type2test([0]) - x *= 2**16 - self.assertRaises(MemoryError, x.__mul__, 2**16) - if hasattr(x, '__imul__'): - self.assertRaises(MemoryError, x.__imul__, 2**16) + import sys + if sys.maxsize <= 2147483647: + x = self.type2test([0]) + x *= 2**16 + self.assertRaises(MemoryError, x.__mul__, 2**16) + if hasattr(x, '__imul__'): + self.assertRaises(MemoryError, x.__imul__, 2**16) def test_subscript(self): a = self.type2test([10, 11]) |