diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_select.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_select.py b/Lib/test/test_select.py index 3144c54..ddb9a0f 100644 --- a/Lib/test/test_select.py +++ b/Lib/test/test_select.py @@ -65,6 +65,16 @@ class SelectTestCase(unittest.TestCase): self.fail('Unexpected return values from select():', rfd, wfd, xfd) p.close() + # Issue 16230: Crash on select resized list + def test_select_mutated(self): + a = [] + class F: + def fileno(self): + del a[-1] + return sys.__stdout__.fileno() + a[:] = [F()] * 10 + self.assertEqual(select.select([], a, []), ([], a[:5], [])) + def test_main(): support.run_unittest(SelectTestCase) support.reap_children() |