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.
This commit is contained in:
Gregory P. Smith 2009-07-04 02:46:54 +00:00
parent b970b86975
commit d06fa47b24
3 changed files with 120 additions and 30 deletions

View file

@ -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__":