Lines Matching +full:run +full:- +full:tests
9 python -m test [options] [test_name1 [test_name2 ...]]
14 Run Python regression tests.
18 them in alphabetical order (but see -M and -u, below, for exceptions).
23 python -E -Wd -m test [options] [test_name1 ...]
29 -r randomizes test execution order. You can use --randseed=int to provide an
33 -s On the first invocation of regrtest using -s, the first test file found
34 or the first test file given on the command line is run, and the name of
35 the next test is recorded in a file named pynexttest. If run from the
38 the test in pynexttest is run, and the next test is written to pynexttest.
39 When the last test has been run, pynexttest is deleted. In this way it
42 consume too many resources to run the full regression test non-stop.
44 -S is used to continue running tests after an aborted run. It will
45 maintain the order a standard run (ie, this assumes -r is not used).
46 This is useful after the tests have prematurely stopped for some external
50 -f reads the names of tests from the file given as f's argument, one
53 whittling down failures involving interactions among tests.
55 -L causes the leaks(1) command to be run just before exit if it exists.
57 FreeBSD-derived systems.
59 -R runs each test several times and examines sys.gettotalrefcount() to
61 be of the form stab:run:fname where 'stab' is the number of times the
62 test is run to let gettotalrefcount settle down, 'run' is the number
63 of times further it is run and 'fname' is the name of the file the
65 "reflog.txt" respectively), and the minimal invocation is '-R :'.
67 -M runs tests that require an exorbitant amount of memory. These tests
69 2 billion objects, which only works on 64-bit systems. There are also some
70 tests that try to exhaust the address space of the process, which only makes
71 sense on 32-bit systems with at least 2Gb of memory. The passed-in memlimit,
73 tests will limit themselves to (but they may go slightly over.) The number
77 tax the machine. On the other hand, it is no use running these tests with a
78 limit of less than 2.5Gb, and many require more than 20Gb. Tests that expect
79 to use more than memlimit memory will be skipped. The big-memory tests
80 generally run very, very long.
82 -u is used to specify which special resource intensive tests to run,
84 The argument is a comma-separated list of words indicating the
87 all - Enable all special resources.
89 none - Disable all special resources (this is the default).
91 audio - Tests that use the audio device. (There are known
95 curses - Tests that use curses and will modify the terminal's
98 largefile - It is okay to run some test that may create huge
99 files. These tests can take a long time and may
102 network - It is okay to run tests that use external network
105 decimal - Test the decimal module against a large suite that
108 cpu - Used for certain CPU-heavy tests.
110 subprocess Run all tests for the subprocess module.
112 urlfetch - It is okay to download files required on testing.
114 gui - Run tests that require a running GUI.
116 tzdata - Run tests that require timezone data.
118 To enable all resources except one, use '-uall,-<resource>'. For
119 example, to run all the tests except for the gui tests, give the
120 option '-uall,-gui'.
122 --matchfile filters tests using a text file, one pattern per line.
125 - test method: test_stat_attributes
126 - test class: FileTests
127 - test identifier: test_os.FileTests.test_stat_attributes
134 # Other resources excluded from --use=all:
136 # - extralagefile (ex: test_zipfile64): really too slow to be enabled
138 # - tzdata: while needed to validate fully test_datetime, it makes
139 # test_datetime too slow (15-20 min on some buildbots) and so is disabled by
140 # default (see bpo-30822).
145 def __init__(self, **kwargs) -> None:
178 super().error(message + "\nPass -h or --help for complete help.")
183 # error messages when using "python -m test ...".
197 group.add_argument('-h', '--help', action='help',
199 group.add_argument('--timeout', metavar='TIMEOUT', type=float,
203 group.add_argument('--wait', action='store_true',
206 group.add_argument('--worker-args', metavar='ARGS')
207 group.add_argument('-S', '--start', metavar='START',
210 group.add_argument('-p', '--python', metavar='PYTHON',
211 help='Command to run Python test subprocesses with.')
214 group.add_argument('-v', '--verbose', action='count',
215 help='run tests in verbose mode with output to stdout')
216 group.add_argument('-w', '--verbose2', action='store_true',
217 help='re-run failed tests in verbose mode')
218 group.add_argument('-W', '--verbose3', action='store_true',
220 group.add_argument('-q', '--quiet', action='store_true',
221 help='no output unless one or more tests fail')
222 group.add_argument('-o', '--slowest', action='store_true', dest='print_slow',
223 help='print the slowest 10 tests')
224 group.add_argument('--header', action='store_true',
227 group = parser.add_argument_group('Selecting tests')
228 group.add_argument('-r', '--randomize', action='store_true',
230 group.add_argument('--randseed', metavar='SEED',
233 'random run')
234 group.add_argument('-f', '--fromfile', metavar='FILE',
235 help='read names of tests to run from a file.' +
237 group.add_argument('-x', '--exclude', action='store_true',
238 help='arguments are tests to *exclude*')
239 group.add_argument('-s', '--single', action='store_true',
240 help='single step through a set of tests.' +
242 group.add_argument('-m', '--match', metavar='PAT',
245 group.add_argument('-i', '--ignore', metavar='PAT',
248 group.add_argument('--matchfile', metavar='FILENAME',
250 help='similar to --match but get patterns from a '
252 group.add_argument('--ignorefile', metavar='FILENAME',
254 help='similar to --matchfile but it receives patterns '
256 group.add_argument('-G', '--failfast', action='store_true',
257 help='fail as soon as a test fails (only with -v or -W)')
258 group.add_argument('-u', '--use', metavar='RES1,RES2,...',
260 help='specify which special resource intensive tests '
261 'to run.' + more_details)
262 group.add_argument('-M', '--memlimit', metavar='LIMIT',
263 help='run very large memory-consuming tests.' +
265 group.add_argument('--testdir', metavar='DIR',
271 group.add_argument('-L', '--runleaks', action='store_true',
272 help='run the leaks(1) command just before exit.' +
274 group.add_argument('-R', '--huntrleaks', metavar='RUNCOUNTS',
278 group.add_argument('-j', '--multiprocess', metavar='PROCESSES',
280 help='run PROCESSES processes at once')
281 group.add_argument('-T', '--coverage', action='store_true',
285 group.add_argument('-D', '--coverdir', metavar='DIR',
288 group.add_argument('-N', '--nocoverdir',
291 group.add_argument('-t', '--threshold', metavar='THRESHOLD',
294 group.add_argument('-n', '--nowindows', action='store_true',
296 group.add_argument('-F', '--forever', action='store_true',
297 help='run the specified tests in a loop, until an '
298 'error happens; imply --failfast')
299 group.add_argument('--list-tests', action='store_true',
300 help="only write the name of tests that will be run, "
302 group.add_argument('--list-cases', action='store_true',
303 help='only write the name of test cases that will be run'
305 group.add_argument('-P', '--pgo', dest='pgo', action='store_true',
307 group.add_argument('--pgo-extended', action='store_true',
309 group.add_argument('--fail-env-changed', action='store_true',
313 group.add_argument('--junit-xml', dest='xmlpath', metavar='FILENAME',
314 help='writes JUnit-style XML results to the specified '
316 group.add_argument('--tempdir', metavar='PATH',
317 help='override the working directory for the test run')
318 group.add_argument('--cleanup', action='store_true',
333 'needs 2 or 3 colon-separated arguments')
345 if r[0] == '-':
368 if arg.startswith('-'):
373 parser.error("-s and -f don't go together!")
375 parser.error("-T and -j don't go together!")
378 parser.error("-p requires -j!")
382 parser.error("-G/--failfast needs either -v or -W")
384 parser.error("--pgo/-v don't go together!")
389 print("Warning: the --nowindows (-n) option is deprecated. "
390 "Use -vv to display assertions in stderr.", file=sys.stderr)
399 # Use all cores + extras for tests that like to sleep
411 if r[0] == '-':
425 print("WARNING: Disable --verbose3 because it's incompatible with "
426 "--huntrleaks: see http://bugs.python.org/issue27103",
441 # --forever implies --failfast