From: Gregory P. Smith Date: Mon, 25 Nov 2013 04:45:27 +0000 (+0000) Subject: Fix test_fcntl to run properly on systems that do not support the flags X-Git-Tag: v2.7.8~244 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d899caa6cafc0e9776a62f108a9c381c7ace52c4;p=python Fix test_fcntl to run properly on systems that do not support the flags used in the "does the value get passed in properly" test. --- diff --git a/Lib/test/test_fcntl.py b/Lib/test/test_fcntl.py index d7e409cefc..a45140f661 100644 --- a/Lib/test/test_fcntl.py +++ b/Lib/test/test_fcntl.py @@ -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)