From: Peter Astrand Date: Thu, 22 Jun 2006 20:06:46 +0000 (+0000) Subject: Make it possible to run test_subprocess.py on Python 2.2, which lacks test_support... X-Git-Tag: v2.5b2~131 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d6b2430b7a99110119743b8529b66c39d1fed722;p=python Make it possible to run test_subprocess.py on Python 2.2, which lacks test_support.is_resource_enabled. --- diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index edf5bd0fd6..9877f51783 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -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