(original) (raw)

changeset: 70291:bff9265d677d user: Victor Stinner victor.stinner@haypocalc.com date: Mon May 23 12:54:52 2011 +0200 files: Lib/test/test_posix.py description: Issue #12105: test_posix, add the value of O_CLOEXEC in the error message diff -r ad1ea4961ead -r bff9265d677d Lib/test/test_posix.py --- a/Lib/test/test_posix.py Mon May 23 12:29:10 2011 +0200 +++ b/Lib/test/test_posix.py Mon May 23 12:54:52 2011 +0200 @@ -312,7 +312,8 @@ 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"): /victor.stinner@haypocalc.com