[Python-checkins] r50537 - python/trunk/Lib/test/test_subprocess.py
peter.astrand
python-checkins at python.org
Mon Jul 10 22:39:49 CEST 2006
Author: peter.astrand
Date: Mon Jul 10 22:39:49 2006
New Revision: 50537
Modified:
python/trunk/Lib/test/test_subprocess.py
Log:
Make it possible to run test_subprocess.py with Python 2.2, which lacks test_support.reap_children().
Modified: python/trunk/Lib/test/test_subprocess.py
==============================================================================
--- python/trunk/Lib/test/test_subprocess.py (original)
+++ python/trunk/Lib/test/test_subprocess.py Mon Jul 10 22:39:49 2006
@@ -30,12 +30,14 @@
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 @@
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()
More information about the Python-checkins
mailing list