From: Victor Stinner Date: Mon, 23 May 2011 10:54:52 +0000 (+0200) Subject: Issue #12105: test_posix, add the value of O_CLOEXEC in the error message X-Git-Tag: v3.3.0a1~2183^2~150 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cc6491a0faab5e57e6e004fd07a5b5ecf2762786;p=thirdparty%2FPython%2Fcpython.git Issue #12105: test_posix, add the value of O_CLOEXEC in the error message --- diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index 9c2cac394fbd..07e6b082e638 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -312,7 +312,8 @@ class PosixTester(unittest.TestCase): def test_oscloexec(self): fd = os.open(support.TESTFN, os.O_RDONLY|os.O_CLOEXEC) self.addCleanup(os.close, fd) - self.assertTrue(fcntl.fcntl(fd, fcntl.F_GETFD) & fcntl.FD_CLOEXEC) + self.assertTrue(fcntl.fcntl(fd, fcntl.F_GETFD) & fcntl.FD_CLOEXEC, + 'CLOEXEC flag not set (O_CLOEXEC=0x%x)' % os.O_CLOEXEC) def test_osexlock(self): if hasattr(posix, "O_EXLOCK"):