mmap.PROT_READ does not exists on win32;
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>
Sat, 16 Feb 2008 00:16:50 +0000 (00:16 +0000)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>
Sat, 16 Feb 2008 00:16:50 +0000 (00:16 +0000)
Skip this test created by r60830.

Lib/test/test_mmap.py

index 2d87eadd2a593fd927ee93dd4c40b147cc61db6a..8a145cfddbaff802105f6393b4a8ac6df1d6e9c1 100644 (file)
@@ -427,6 +427,8 @@ class MmapTests(unittest.TestCase):
         anon_mmap(PAGESIZE)
 
     def test_prot_readonly(self):
+        if not hasattr(mmap, 'PROT_READ'):
+            return
         mapsize = 10
         open(TESTFN, "wb").write("a"*mapsize)
         f = open(TESTFN, "rb")