From 42e4124304493e93d490fcf1147617a8adc4da0d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Fri, 15 Feb 2008 19:52:38 +0000 Subject: [PATCH] Revert 60793 for test_array; on a 64-bit system, MemoryError was not guaranteed. --- Lib/test/test_array.py | 17 ----------------- Misc/NEWS | 1 + 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py index a665bacc25..597f3b2421 100755 --- a/Lib/test/test_array.py +++ b/Lib/test/test_array.py @@ -975,23 +975,6 @@ tests.append(FloatTest) class DoubleTest(FPTest): typecode = 'd' minitemsize = 8 - - def test_alloc_overflow(self): - a = array.array('d', [-1]*65536) - try: - a *= 65536 - except MemoryError: - pass - else: - self.fail("a *= 2**16 didn't raise MemoryError") - b = array.array('d', [ 2.71828183, 3.14159265, -1]) - try: - b * 1431655766 - except MemoryError: - pass - else: - self.fail("a * 1431655766 didn't raise MemoryError") - tests.append(DoubleTest) def test_main(verbose=None): diff --git a/Misc/NEWS b/Misc/NEWS index d5efce7bdb..ac96e2117f 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -13,6 +13,7 @@ Extension Modules ----------------- - Fix deallocation of array objects when allocation ran out of memory. + Remove array test case that was incorrect on 64-bit systems. What's New in Python 2.5.2c1? -- 2.50.0