]> granicus.if.org Git - python/commitdiff
Fix test_fcntl to run properly on systems that do not support the flags
authorGregory P. Smith <greg@krypto.org>
Mon, 25 Nov 2013 04:45:27 +0000 (04:45 +0000)
committerGregory P. Smith <greg@krypto.org>
Mon, 25 Nov 2013 04:45:27 +0000 (04:45 +0000)
used in the "does the value get passed in properly" test.

Lib/test/test_fcntl.py

index d7e409cefc6f10ff729c0998f7b05ff5795f7a43..a45140f6611d2947d3c638284f0f59e454083ae4 100644 (file)
@@ -113,7 +113,10 @@ class TestFcntl(unittest.TestCase):
             self.skipTest("F_NOTIFY or DN_MULTISHOT unavailable")
         fd = os.open(os.path.dirname(os.path.abspath(TESTFN)), os.O_RDONLY)
         try:
+            # This will raise OverflowError if issue1309352 is present.
             fcntl.fcntl(fd, cmd, flags)
+        except IOError:
+            pass  # Running on a system that doesn't support these flags.
         finally:
             os.close(fd)