bpo-32941: Fix test_madvise failure when page size >= 8kiB (GH-13596)

https://bugs.python.org/issue32941
This commit is contained in:
Antoine Pitrou 2019-05-27 19:57:23 +02:00 committed by Miss Islington (bot)
parent a8e814db96
commit 695b1dd8cb

View file

@ -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"):