mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #12105: test_posix, add the value of O_CLOEXEC in the error message
This commit is contained in:
parent
9b49304790
commit
cc6491a0fa
1 changed files with 2 additions and 1 deletions
|
@ -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"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue