Commit 7348c6bb authored by Victor Stinner's avatar Victor Stinner

(merge 3.2) Issue #12400: don't use sys.stderr in test_kqueue because it may be

replaced by a io.StringIO object by regrtest (which has no file descriptor).
parents 7e32f3a4 46b20911
......@@ -23,7 +23,10 @@ class TestKQueue(unittest.TestCase):
def test_create_event(self):
from operator import lt, le, gt, ge
fd = sys.stderr.fileno()
fd = os.open(os.devnull, os.O_WRONLY)
self.addCleanup(os.close, fd)
ev = select.kevent(fd)
other = select.kevent(1000)
self.assertEqual(ev.ident, fd)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment