]> granicus.if.org Git - python/commitdiff
Make it possible to run test_subprocess.py on Python 2.2, which lacks test_support...
authorPeter Astrand <astrand@lysator.liu.se>
Thu, 22 Jun 2006 20:06:46 +0000 (20:06 +0000)
committerPeter Astrand <astrand@lysator.liu.se>
Thu, 22 Jun 2006 20:06:46 +0000 (20:06 +0000)
Lib/test/test_subprocess.py

index edf5bd0fd69a20490b0b5f16762b3f15750e0447..9877f51783c6e36e38b963972f3af66ec9f79042 100644 (file)
@@ -384,7 +384,8 @@ class ProcessTestCase(unittest.TestCase):
 
     def test_no_leaking(self):
         # Make sure we leak no resources
-        if test_support.is_resource_enabled("subprocess") and not mswindows:
+        if not hasattr(test_support, "is_resource_enabled") \
+               or test_support.is_resource_enabled("subprocess") and not mswindows:
             max_handles = 1026 # too much for most UNIX systems
         else:
             max_handles = 65