Kaydet (Commit) 3a4586a9 authored tarafından Charles-François Natali's avatar Charles-François Natali

Issue #18923: Update subprocess to use the new selectors module.

üst 2ce6c44a
This diff is collapsed.
......@@ -11,6 +11,7 @@ import errno
import tempfile
import time
import re
import selectors
import sysconfig
import warnings
import select
......@@ -2179,15 +2180,16 @@ class CommandTests(unittest.TestCase):
os.rmdir(dir)
@unittest.skipUnless(getattr(subprocess, '_has_poll', False),
"poll system call not supported")
@unittest.skipUnless(hasattr(selectors, 'PollSelector'),
"Test needs selectors.PollSelector")
class ProcessTestCaseNoPoll(ProcessTestCase):
def setUp(self):
subprocess._has_poll = False
self.orig_selector = subprocess._PopenSelector
subprocess._PopenSelector = selectors.SelectSelector
ProcessTestCase.setUp(self)
def tearDown(self):
subprocess._has_poll = True
subprocess._PopenSelector = self.orig_selector
ProcessTestCase.tearDown(self)
......
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