diff Lib/test/support.py @ 52069:bfc2fa4c8444

Issue #3700: make test_bigmem py3k-compatible, and add bytes/bytearray tests (please note: some of the tests /do/ fail when run with a sufficiently large memory parameter (-M), perhaps because of the str/bytes/bytearray overhaul)
author Antoine Pitrou <solipsis@pitrou.net>
date Sat, 07 Mar 2009 23:40:49 +0000
parents af36ba123c1d
children d4e7470bd660
line wrap: on
line diff
--- a/Lib/test/support.py	Sat Mar 07 18:46:21 2009 +0000
+++ b/Lib/test/support.py	Sat Mar 07 23:40:49 2009 +0000
@@ -609,6 +609,10 @@
     """
     def decorator(f):
         def wrapper(self):
+            # Retrieve values in case someone decided to adjust them
+            minsize = wrapper.minsize
+            memuse = wrapper.memuse
+            overhead = wrapper.overhead
             if not max_memuse:
                 # If max_memuse is 0 (the default),
                 # we still want to run the tests with size set to a few kb,
@@ -636,6 +640,9 @@
 def precisionbigmemtest(size, memuse, overhead=5*_1M):
     def decorator(f):
         def wrapper(self):
+            size = wrapper.size
+            memuse = wrapper.memuse
+            overhead = wrapper.overhead
             if not real_max_memuse:
                 maxsize = 5147
             else: