]> granicus.if.org Git - python/commitdiff
Do the small-memory run of big-meormy tests using a prime number, rather
authorThomas Wouters <thomas@python.org>
Thu, 27 Apr 2006 22:38:32 +0000 (22:38 +0000)
committerThomas Wouters <thomas@python.org>
Thu, 27 Apr 2006 22:38:32 +0000 (22:38 +0000)
than a convenient power-of-2-and-multiple-of-5, so incorrect testing
algorithms fail more easily.

Lib/test/test_support.py

index 85a6279b32d6971d3663b88a9c827474f87fcc03..c1a635a782e20fc33f104c610d9ca0f0ea115eab 100644 (file)
@@ -298,7 +298,7 @@ def bigmemtest(minsize, memuse, overhead=5*_1M):
                 # we still want to run the tests with size set to a few kb,
                 # to make sure they work. We still want to avoid using
                 # too much memory, though, but we do that noisily.
-                maxsize = 1024*5
+                maxsize = 5147
                 self.failIf(maxsize * memuse + overhead > 20 * _1M)
             else:
                 maxsize = int((max_memuse - overhead) / memuse)