summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_subprocess.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2009-07-04 02:46:54 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2009-07-04 02:46:54 (GMT)
commitd06fa47b2417c8dc2649db661961548d6e6a57e2 (patch)
treede953c8e3dbbea0c4996d838364451c23c22ca6b /Lib/test/test_subprocess.py
parentb970b869750ffbd0576153d26e7416e583225f44 (diff)
downloadcpython-d06fa47b2417c8dc2649db661961548d6e6a57e2.zip
cpython-d06fa47b2417c8dc2649db661961548d6e6a57e2.tar.gz
cpython-d06fa47b2417c8dc2649db661961548d6e6a57e2.tar.bz2
Merged revisions 73825-73826 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r73825 | gregory.p.smith | 2009-07-03 18:49:29 -0700 (Fri, 03 Jul 2009) | 9 lines Use select.poll() in subprocess, when available, rather than select() so that it does not fail when file descriptors are large. Fixes issue3392. Patch largely contributed by Frank Chu (fpmc) with some improvements by me. See http://bugs.python.org/issue3392. ........ r73826 | gregory.p.smith | 2009-07-03 18:55:11 -0700 (Fri, 03 Jul 2009) | 2 lines news entry for r73825 ........ Candidate for backporting to release31-maint as it is a bug fix and changes no public API.
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r--Lib/test/test_subprocess.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index 326c996..f2a396c 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -798,8 +798,24 @@ class CommandTests(unittest.TestCase):
if dir is not None:
os.rmdir(dir)
+
+unit_tests = [ProcessTestCase, CommandTests]
+
+if subprocess._has_poll:
+ class ProcessTestCaseNoPoll(ProcessTestCase):
+ def setUp(self):
+ subprocess._has_poll = False
+ ProcessTestCase.setUp(self)
+
+ def tearDown(self):
+ subprocess._has_poll = True
+ ProcessTestCase.tearDown(self)
+
+ unit_tests.append(ProcessTestCaseNoPoll)
+
+
def test_main():
- support.run_unittest(ProcessTestCase, CommandTests)
+ support.run_unittest(*unit_tests)
support.reap_children()
if __name__ == "__main__":