Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4efa39c

Browse files
committed
Always import select
Signed-off-by: Christian Heimes <[email protected]>
1 parent 9c0dff5 commit 4efa39c

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

Lib/test/test_os.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import mmap
1616
import os
1717
import pickle
18+
import select
1819
import shutil
1920
import signal
2021
import socket
@@ -60,10 +61,6 @@
6061
except ImportError:
6162
INT_MAX = PY_SSIZE_T_MAX = sys.maxsize
6263

63-
try:
64-
import select
65-
except ImportError:
66-
select = None
6764

6865
from test.support.script_helper import assert_python_ok
6966
from test.support import unix_shell
@@ -3594,9 +3591,6 @@ def test_eventfd_semaphore(self):
35943591
with self.assertRaises(BlockingIOError):
35953592
os.eventfd_read(fd)
35963593

3597-
@unittest.skipUnless(
3598-
hasattr(select, "select"), reason="test needs select.select"
3599-
)
36003594
def test_eventfd_select(self):
36013595
flags = os.EFD_CLOEXEC | os.EFD_NONBLOCK
36023596
fd = os.eventfd(0, flags)

0 commit comments

Comments
 (0)