mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Only run extensive subprocess tests if -usubprocess to regrtest is specified. Fixes #1124637
This commit is contained in:
parent
23109f0009
commit
f7f1bb7ff5
2 changed files with 7 additions and 4 deletions
|
|
@ -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())"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue