diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-23 10:54:52 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-23 10:54:52 (GMT) |
commit | cc6491a0faab5e57e6e004fd07a5b5ecf2762786 (patch) | |
tree | 9c32af96704ed3892276f8ba4ebc94344816707c /Lib/test/test_posix.py | |
parent | 9b49304790a9ada10c4d0d13422ee350353cbeb0 (diff) | |
download | cpython-cc6491a0faab5e57e6e004fd07a5b5ecf2762786.zip cpython-cc6491a0faab5e57e6e004fd07a5b5ecf2762786.tar.gz cpython-cc6491a0faab5e57e6e004fd07a5b5ecf2762786.tar.bz2 |
Issue #12105: test_posix, add the value of O_CLOEXEC in the error message
Diffstat (limited to 'Lib/test/test_posix.py')
-rw-r--r-- | Lib/test/test_posix.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index 9c2cac3..07e6b08 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"): |