summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_mmap.py
diff options
context:
space:
mode:
authorAntoine Pitrou <antoine@python.org>2019-05-27 17:57:23 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-05-27 17:57:23 (GMT)
commit695b1dd8cbf3a48fdb30ab96918a49b20b7ec3e7 (patch)
treed6cdb37a9751b0f6d60f0ac7811ce21832fb0377 /Lib/test/test_mmap.py
parenta8e814db96ebfeb1f58bc471edffde2176c0ae05 (diff)
downloadcpython-695b1dd8cbf3a48fdb30ab96918a49b20b7ec3e7.zip
cpython-695b1dd8cbf3a48fdb30ab96918a49b20b7ec3e7.tar.gz
cpython-695b1dd8cbf3a48fdb30ab96918a49b20b7ec3e7.tar.bz2
bpo-32941: Fix test_madvise failure when page size >= 8kiB (GH-13596)
https://bugs.python.org/issue32941
Diffstat (limited to 'Lib/test/test_mmap.py')
-rw-r--r--Lib/test/test_mmap.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py
index 7b2b100..88c501d 100644
--- a/Lib/test/test_mmap.py
+++ b/Lib/test/test_mmap.py
@@ -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"):