Skip to content

Commit

Permalink
bpo-32941: Fix test_madvise failure when page size >= 8kiB (pythonGH-…
Browse files Browse the repository at this point in the history
  • Loading branch information
pitrou authored and miss-islington committed May 27, 2019
1 parent a8e814d commit 695b1dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lib/test/test_mmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

PAGESIZE = mmap.PAGESIZE


class MmapTests(unittest.TestCase):

def setUp(self):
Expand Down Expand Up @@ -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"):
Expand Down

0 comments on commit 695b1dd

Please sign in to comment.