mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-40275: Fix failed test cases by using test helpers (GH-21811)
This commit is contained in:
parent
a02efe4d27
commit
490c5426b1
4 changed files with 9 additions and 9 deletions
|
@ -6,6 +6,7 @@ import signal
|
|||
import socket
|
||||
import sys
|
||||
from test import support
|
||||
from test.support import os_helper
|
||||
from test.support import socket_helper
|
||||
from time import sleep
|
||||
import unittest
|
||||
|
@ -536,7 +537,7 @@ class KqueueSelectorTestCase(BaseSelectorTestCase, ScalableSelectorMixIn):
|
|||
# a file descriptor that's been closed should raise an OSError
|
||||
# with EBADF
|
||||
s = self.SELECTOR()
|
||||
bad_f = support.make_bad_fd()
|
||||
bad_f = os_helper.make_bad_fd()
|
||||
with self.assertRaises(OSError) as cm:
|
||||
s.register(bad_f, selectors.EVENT_READ)
|
||||
self.assertEqual(cm.exception.errno, errno.EBADF)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue