summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_selectors.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_selectors.py')
-rw-r--r--Lib/test/test_selectors.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/Lib/test/test_selectors.py b/Lib/test/test_selectors.py
index 46026be..544ea7b 100644
--- a/Lib/test/test_selectors.py
+++ b/Lib/test/test_selectors.py
@@ -8,10 +8,7 @@ from test import support
from time import sleep
import unittest
import unittest.mock
-try:
- from time import monotonic as time
-except ImportError:
- from time import time as time
+from time import monotonic as time
try:
import resource
except ImportError:
@@ -24,7 +21,7 @@ else:
def socketpair(family=socket.AF_INET, type=socket.SOCK_STREAM, proto=0):
with socket.socket(family, type, proto) as l:
l.bind((support.HOST, 0))
- l.listen(3)
+ l.listen()
c = socket.socket(family, type, proto)
try:
c.connect(l.getsockname())
@@ -441,10 +438,18 @@ class KqueueSelectorTestCase(BaseSelectorTestCase, ScalableSelectorMixIn):
SELECTOR = getattr(selectors, 'KqueueSelector', None)
+@unittest.skipUnless(hasattr(selectors, 'DevpollSelector'),
+ "Test needs selectors.DevpollSelector")
+class DevpollSelectorTestCase(BaseSelectorTestCase, ScalableSelectorMixIn):
+
+ SELECTOR = getattr(selectors, 'DevpollSelector', None)
+
+
+
def test_main():
tests = [DefaultSelectorTestCase, SelectSelectorTestCase,
PollSelectorTestCase, EpollSelectorTestCase,
- KqueueSelectorTestCase]
+ KqueueSelectorTestCase, DevpollSelectorTestCase]
support.run_unittest(*tests)
support.reap_children()