From: Xavier de Gaye Date: Thu, 17 Nov 2016 08:20:28 +0000 (+0100) Subject: Issue #26926: Skip some test_io tests on platforms without large file support X-Git-Tag: v3.6.0b4~59 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=877f03695081c3ac0d99f9167b3c6ebabe8c04e8;p=thirdparty%2FPython%2Fcpython.git Issue #26926: Skip some test_io tests on platforms without large file support --- diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py index 8a2111cbd71c..aaa64eadffe1 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -350,7 +350,10 @@ class IOTest(unittest.TestCase): def large_file_ops(self, f): assert f.readable() assert f.writable() - self.assertEqual(f.seek(self.LARGE), self.LARGE) + try: + self.assertEqual(f.seek(self.LARGE), self.LARGE) + except (OverflowError, ValueError): + self.skipTest("no largefile support") self.assertEqual(f.tell(), self.LARGE) self.assertEqual(f.write(b"xxx"), 3) self.assertEqual(f.tell(), self.LARGE + 3)