mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
Issue #11651: Move options for running tests into a Python script.
This will be particularly useful to Windows users. run_tests.py originally written by Brett Cannon.
This commit is contained in:
parent
b0fa4b8433
commit
3c01d16ed9
4 changed files with 75 additions and 16 deletions
|
@ -133,6 +133,8 @@ resources to test. Currently only the following are defined:
|
|||
|
||||
all - Enable all special resources.
|
||||
|
||||
none - Disable all special resources (this is the default).
|
||||
|
||||
audio - Tests that use the audio device. (There are known
|
||||
cases of broken audio drivers that can crash Python or
|
||||
even the Linux kernel.)
|
||||
|
@ -387,6 +389,9 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
|
|||
if r == 'all':
|
||||
use_resources[:] = RESOURCE_NAMES
|
||||
continue
|
||||
if r == 'none':
|
||||
del use_resources[:]
|
||||
continue
|
||||
remove = False
|
||||
if r[0] == '-':
|
||||
remove = True
|
||||
|
@ -424,6 +429,8 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
|
|||
use_mp = 2 + multiprocessing.cpu_count()
|
||||
except (ImportError, NotImplementedError):
|
||||
use_mp = 3
|
||||
if use_mp == 1:
|
||||
use_mp = None
|
||||
elif o == '--header':
|
||||
header = True
|
||||
elif o == '--slaveargs':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue