diff options
author | Peter Astrand <astrand@lysator.liu.se> | 2005-03-03 20:47:37 (GMT) |
---|---|---|
committer | Peter Astrand <astrand@lysator.liu.se> | 2005-03-03 20:47:37 (GMT) |
commit | f7f1bb7ff5039626c856efafb68a4d338ab96642 (patch) | |
tree | ae29d54bdddb9a00d5193ee3ae703d0992af1eff /Lib/test/test_subprocess.py | |
parent | 23109f0009b34af04350417b17efc8190879ea78 (diff) | |
download | cpython-f7f1bb7ff5039626c856efafb68a4d338ab96642.zip cpython-f7f1bb7ff5039626c856efafb68a4d338ab96642.tar.gz cpython-f7f1bb7ff5039626c856efafb68a4d338ab96642.tar.bz2 |
Only run extensive subprocess tests if -usubprocess to regrtest is specified. Fixes #1124637
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r-- | Lib/test/test_subprocess.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index e8415cd..efee5b5 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -382,9 +382,10 @@ class ProcessTestCase(unittest.TestCase): def test_no_leaking(self): # Make sure we leak no resources - max_handles = 1026 # too much for most UNIX systems - if mswindows: - max_handles = 65 # a full test is too slow on Windows + if test_support.is_resource_enabled("subprocess") and not mswindows: + max_handles = 1026 # too much for most UNIX systems + else: + max_handles = 65 for i in range(max_handles): p = subprocess.Popen([sys.executable, "-c", "import sys;sys.stdout.write(sys.stdin.read())"], |