summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_selectors.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2014-12-08 17:22:33 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2014-12-08 17:22:33 (GMT)
commit7f98d3ecb87ec4c753e7299cc09b87b54e686e59 (patch)
treec0a6c3d14705dfebe7146bf43bba696a605ec252 /Lib/test/test_selectors.py
parente3e8b07bcbb12cb09519495700fdbe3e4c9b9836 (diff)
parentd60ef4aa9daff89af06117e7e2ae83adfb8c9dce (diff)
downloadcpython-7f98d3ecb87ec4c753e7299cc09b87b54e686e59.zip
cpython-7f98d3ecb87ec4c753e7299cc09b87b54e686e59.tar.gz
cpython-7f98d3ecb87ec4c753e7299cc09b87b54e686e59.tar.bz2
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 544ea7b..2625c12 100644
--- a/Lib/test/test_selectors.py
+++ b/Lib/test/test_selectors.py
@@ -316,6 +316,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)