summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorPeter Astrand <astrand@lysator.liu.se>2006-07-10 20:39:49 +0000
committerPeter Astrand <astrand@lysator.liu.se>2006-07-10 20:39:49 +0000
commit0f8c1f55865eda1cfd6cf1234e6bf5cd0a3342ab (patch)
tree2fc7c30fa38e3cb6649b160808b39db02a72fbdb /Lib
parentade0e1224c506fdc025bd2d9140680649e270d08 (diff)
downloadcpython-0f8c1f55865eda1cfd6cf1234e6bf5cd0a3342ab.tar.gz
Make it possible to run test_subprocess.py with Python 2.2, which lacks test_support.reap_children().
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_subprocess.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index 91257a7996..483e202410 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -30,12 +30,14 @@ class ProcessTestCase(unittest.TestCase):
def setUp(self):
# Try to minimize the number of children we have so this test
# doesn't crash on some buildbots (Alphas in particular).
- test_support.reap_children()
+ if hasattr(test_support, "reap_children"):
+ test_support.reap_children()
def tearDown(self):
# Try to minimize the number of children we have so this test
# doesn't crash on some buildbots (Alphas in particular).
- test_support.reap_children()
+ if hasattr(test_support, "reap_children"):
+ test_support.reap_children()
def mkstemp(self):
"""wrapper for mkstemp, calling mktemp if mkstemp is not available"""
@@ -610,7 +612,8 @@ class ProcessTestCase(unittest.TestCase):
def test_main():
test_support.run_unittest(ProcessTestCase)
- test_support.reap_children()
+ if hasattr(test_support, "reap_children"):
+ test_support.reap_children()
if __name__ == "__main__":
test_main()