From: Benjamin Peterson Date: Thu, 6 Oct 2016 05:00:05 +0000 (-0700) Subject: skip test if resizing is not supported X-Git-Tag: v2.7.13rc1~91 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=38297d7de63b7e154b57595a77c406aa418231ed;p=python skip test if resizing is not supported --- diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py index 037c4940cf..961aae1f6e 100644 --- a/Lib/test/test_mmap.py +++ b/Lib/test/test_mmap.py @@ -656,9 +656,12 @@ 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), '') - self.assertRaises(ValueError, m.read_byte,) + self.assertRaises(ValueError, m.read_byte,1) self.assertRaises(ValueError, m.write_byte, 'b') self.assertRaises(ValueError, m.write, 'abc')