Skip to content

Commit 23ea074

Browse files
committed
dzień dobry, os_helper.make_bad_fd
1 parent 46e604d commit 23ea074

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Lib/test/test_os/test_posix.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,6 +1625,11 @@ def test_pidfd_getfd(self):
16251625
os.pidfd_getfd(-1, 0)
16261626
self.assertEqual(cm.exception.errno, errno.EBADF)
16271627

1628+
with self.assertRaises(OSError) as cm:
1629+
bad_fd = os_helper.make_bad_fd()
1630+
os.pidfd_getfd(pidfd, bad_fd)
1631+
self.assertEqual(cm.exception.errno, errno.EBADF)
1632+
16281633
@os_helper.skip_unless_hardlink
16291634
@os_helper.skip_unless_symlink
16301635
def test_link_follow_symlinks(self):

0 commit comments

Comments
 (0)