]> granicus.if.org Git - python/commitdiff
skip test if resizing is not supported
authorBenjamin Peterson <benjamin@python.org>
Thu, 6 Oct 2016 05:00:05 +0000 (22:00 -0700)
committerBenjamin Peterson <benjamin@python.org>
Thu, 6 Oct 2016 05:00:05 +0000 (22:00 -0700)
Lib/test/test_mmap.py

index f8de8c2e63bb7100ecb28da4e3dd8102426e218b..b8a0135043f73cd1cbdc714148944628c52af565 100644 (file)
@@ -717,7 +717,10 @@ class MmapTests(unittest.TestCase):
         m = mmap.mmap(-1, 8192)
         self.addCleanup(m.close)
         m.read(5000)
-        m.resize(4096)
+        try:
+            m.resize(4096)
+        except SystemError:
+            self.skipTest("resizing not supported")
         self.assertEqual(m.read(14), b'')
         self.assertRaises(ValueError, m.read_byte,)
         self.assertRaises(ValueError, m.write_byte, 42)