diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2014-12-08 12:21:58 -0500 |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2014-12-08 12:21:58 -0500 |
commit | 4797c0215fe83cf4e5916723532b4dd5c25fb3c5 (patch) | |
tree | 9bd0b0ec4c5b41ef4e7d4f931b3d3cd4a2e1c538 /Lib/test/test_selectors.py | |
parent | 84093500ac2b9ddfb9fcc8463e608398538dabe2 (diff) | |
download | cpython-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.py | 5 |
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) |