summaryrefslogtreecommitdiff
path: root/Lib/test/test_selectors.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2014-12-08 12:21:58 -0500
committerYury Selivanov <yselivanov@sprymix.com>2014-12-08 12:21:58 -0500
commit4797c0215fe83cf4e5916723532b4dd5c25fb3c5 (patch)
tree9bd0b0ec4c5b41ef4e7d4f931b3d3cd4a2e1c538 /Lib/test/test_selectors.py
parent84093500ac2b9ddfb9fcc8463e608398538dabe2 (diff)
downloadcpython-4797c0215fe83cf4e5916723532b4dd5c25fb3c5.tar.gz
selectors: Make sure EpollSelecrtor.select() works when no FD is registered.
Closes issue #23009.
Diffstat (limited to 'Lib/test/test_selectors.py')
-rw-r--r--Lib/test/test_selectors.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_selectors.py b/Lib/test/test_selectors.py
index 46026be0aa..c08a3c4989 100644
--- a/Lib/test/test_selectors.py
+++ b/Lib/test/test_selectors.py
@@ -319,6 +319,11 @@ class BaseSelectorTestCase(unittest.TestCase):
self.assertEqual(bufs, [MSG] * NUM_SOCKETS)
+ def test_empty_select(self):
+ s = self.SELECTOR()
+ self.addCleanup(s.close)
+ self.assertEqual(s.select(timeout=0), [])
+
def test_timeout(self):
s = self.SELECTOR()
self.addCleanup(s.close)