Skip to content

Commit 695b1dd

Browse files
pitroumiss-islington
authored andcommitted
bpo-32941: Fix test_madvise failure when page size >= 8kiB (GH-13596)
https://bugs.python.org/issue32941
1 parent a8e814d commit 695b1dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_mmap.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
PAGESIZE = mmap.PAGESIZE
1515

16+
1617
class MmapTests(unittest.TestCase):
1718

1819
def setUp(self):
@@ -741,7 +742,7 @@ def test_flush_return_value(self):
741742

742743
@unittest.skipUnless(hasattr(mmap.mmap, 'madvise'), 'needs madvise')
743744
def test_madvise(self):
744-
size = 8192
745+
size = 2 * PAGESIZE
745746
m = mmap.mmap(-1, size)
746747

747748
with self.assertRaisesRegex(ValueError, "madvise start out of bounds"):

0 commit comments

Comments
 (0)