From 7ae67e0e0cdb015b98bf4aa87adfb71e392ba5e3 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Mon, 27 May 2019 19:27:13 +0200 Subject: [PATCH] Fix test_madvise failure when page size >= 8kiB --- Lib/test/test_mmap.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py index 7b2b100dce0155..88c501d81a07f9 100644 --- a/Lib/test/test_mmap.py +++ b/Lib/test/test_mmap.py @@ -13,6 +13,7 @@ PAGESIZE = mmap.PAGESIZE + class MmapTests(unittest.TestCase): def setUp(self): @@ -741,7 +742,7 @@ def test_flush_return_value(self): @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"):