]> granicus.if.org Git - python/commitdiff
bpo-32941: Fix test_madvise failure when page size >= 8kiB (GH-13596)
authorAntoine Pitrou <antoine@python.org>
Mon, 27 May 2019 17:57:23 +0000 (19:57 +0200)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 27 May 2019 17:57:23 +0000 (10:57 -0700)
https://bugs.python.org/issue32941

Lib/test/test_mmap.py

index 7b2b100dce0155d6acae542e0ae182ae2c225300..88c501d81a07f9a21df86965d98be72db62efad6 100644 (file)
@@ -13,6 +13,7 @@ mmap = import_module('mmap')
 
 PAGESIZE = mmap.PAGESIZE
 
+
 class MmapTests(unittest.TestCase):
 
     def setUp(self):
@@ -741,7 +742,7 @@ class MmapTests(unittest.TestCase):
 
     @unittest.skipUnless(hasattr(mmap.mmap, 'madvise'), 'needs madvise')
     def test_madvise(self):
-        size = 8192
+        size = 2 * PAGESIZE
         m = mmap.mmap(-1, size)
 
         with self.assertRaisesRegex(ValueError, "madvise start out of bounds"):