diff options
author | Peter Astrand <astrand@lysator.liu.se> | 2005-03-03 20:51:32 (GMT) |
---|---|---|
committer | Peter Astrand <astrand@lysator.liu.se> | 2005-03-03 20:51:32 (GMT) |
commit | 11ca19675d6c8a1e727b643137f96c483af48863 (patch) | |
tree | 54164c6b1e65c8a8016dbb996ae42c5efadb3b2f | |
parent | acfb5bdf150f47bac9a1baf9913f50919f7958d1 (diff) | |
download | cpython-11ca19675d6c8a1e727b643137f96c483af48863.zip cpython-11ca19675d6c8a1e727b643137f96c483af48863.tar.gz cpython-11ca19675d6c8a1e727b643137f96c483af48863.tar.bz2 |
Only run extensive subprocess tests if -usubprocess to regrtest is specified. Fixes #1124637
-rwxr-xr-x | Lib/test/regrtest.py | 4 | ||||
-rw-r--r-- | Lib/test/test_subprocess.py | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 4835e64..20407f8 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -93,6 +93,8 @@ resources to test. Currently only the following are defined: in the standard library and test suite. This takes a long time. + subprocess Run all tests for the subprocess module. + To enable all resources except one, use '-uall,-<resource>'. For example, to run all the tests except for the bsddb tests, give the option '-uall,-bsddb'. @@ -136,7 +138,7 @@ if sys.platform == 'darwin': from test import test_support RESOURCE_NAMES = ('audio', 'curses', 'largefile', 'network', 'bsddb', - 'decimal', 'compiler') + 'decimal', 'compiler', 'subprocess') def usage(code, msg=''): diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index b26d40c..e79dbde 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -343,9 +343,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())"], |