Mercurial > cpython-lru_cache-weakref
annotate Lib/test/regrtest.py @ 54294:dba767bc3155 legacy-trunk
remove mention of old ctypes version
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Sat, 23 May 2009 20:59:09 +0000 |
| parents | b600e5103c63 |
| children | d74b8edd7a8c |
| rev | line source |
|---|---|
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
1 #! /usr/bin/env python |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
2 |
|
46675
55bf8d690e67
Revert bogus checkin in r62724 to that file.
Martin v. Löwis <martin@v.loewis.de>
parents:
46671
diff
changeset
|
3 """Regression test. |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
4 |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
5 This will find all modules whose name is "test_*" in the test |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
6 directory, and run them. Various command line options provide |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
7 additional facilities. |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
8 |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
9 Command line options: |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
10 |
|
32924
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
11 -v: verbose -- run tests in verbose mode with output to stdout |
|
36933
ebeba7353894
Add regrtest -w option.
Martin v. Löwis <martin@v.loewis.de>
parents:
36719
diff
changeset
|
12 -w: verbose2 -- re-run failed tests in verbose mode |
|
32924
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
13 -q: quiet -- don't print anything except if a test fails |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
14 -x: exclude -- arguments are tests to *exclude* |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
15 -s: single -- run only a single test (see below) |
|
45840
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
16 -S: slow -- print the slowest 10 tests |
|
32924
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
17 -r: random -- randomize test execution order |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
18 -f: fromfile -- read names of tests to run from a file (see below) |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
19 -l: findleaks -- if GC is available detect tests that leak memory |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
20 -u: use -- specify which special resource intensive tests to run |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
21 -h: help -- print this text and exit |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
22 -t: threshold -- call gc.set_threshold(N) |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
23 -T: coverage -- turn on code coverage using the trace module |
|
33982
468a10ebbcd5
Add options to regrtest.py to make it possible to specify where to put
Walter Dörwald <walter@livinglogic.de>
parents:
33374
diff
changeset
|
24 -D: coverdir -- Directory where coverage files are put |
|
468a10ebbcd5
Add options to regrtest.py to make it possible to specify where to put
Walter Dörwald <walter@livinglogic.de>
parents:
33374
diff
changeset
|
25 -N: nocoverdir -- Put coverage files alongside modules |
|
32924
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
26 -L: runleaks -- run the leaks(1) command just before exit |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
27 -R: huntrleaks -- search for reference leaks (needs debug build, v. slow) |
|
37992
8dc2a4d8a22e
The result of SF patch #1471578: big-memory tests for strings, lists and
Thomas Wouters <thomas@python.org>
parents:
37694
diff
changeset
|
28 -M: memlimit -- run very large memory-consuming tests |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
29 |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
30 If non-option arguments are present, they are names for tests to run, |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
31 unless -x is given, in which case they are names for tests not to run. |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
32 If no test names are given, all tests are run. |
|
5175
197e3206e3f3
Add "extra-verbose" mode, triggered by specifying two -v flags. In
Guido van Rossum <guido@python.org>
parents:
4794
diff
changeset
|
33 |
|
52398
9134a2091013
Add the ability to control the random seed used by regrtest.py -r.
Collin Winter <collinw@gmail.com>
parents:
52353
diff
changeset
|
34 -r randomizes test execution order. You can use --randseed=int to provide a |
|
9134a2091013
Add the ability to control the random seed used by regrtest.py -r.
Collin Winter <collinw@gmail.com>
parents:
52353
diff
changeset
|
35 int seed value for the randomizer; this is useful for reproducing troublesome |
|
9134a2091013
Add the ability to control the random seed used by regrtest.py -r.
Collin Winter <collinw@gmail.com>
parents:
52353
diff
changeset
|
36 test orders. |
|
9134a2091013
Add the ability to control the random seed used by regrtest.py -r.
Collin Winter <collinw@gmail.com>
parents:
52353
diff
changeset
|
37 |
|
31475
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
38 -T turns on code coverage tracing with the trace module. |
|
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
39 |
|
33982
468a10ebbcd5
Add options to regrtest.py to make it possible to specify where to put
Walter Dörwald <walter@livinglogic.de>
parents:
33374
diff
changeset
|
40 -D specifies the directory where coverage files are put. |
|
468a10ebbcd5
Add options to regrtest.py to make it possible to specify where to put
Walter Dörwald <walter@livinglogic.de>
parents:
33374
diff
changeset
|
41 |
|
468a10ebbcd5
Add options to regrtest.py to make it possible to specify where to put
Walter Dörwald <walter@livinglogic.de>
parents:
33374
diff
changeset
|
42 -N Put coverage files alongside modules. |
|
468a10ebbcd5
Add options to regrtest.py to make it possible to specify where to put
Walter Dörwald <walter@livinglogic.de>
parents:
33374
diff
changeset
|
43 |
|
23733
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
44 -s means to run only a single test and exit. This is useful when |
|
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
45 doing memory analysis on the Python interpreter (which tend to consume |
|
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
46 too many resources to run the full regression test non-stop). The |
|
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
47 file /tmp/pynexttest is read to find the next test to run. If this |
|
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
48 file is missing, the first test_*.py file in testdir or on the command |
|
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
49 line is used. (actually tempfile.gettempdir() is used instead of |
|
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
50 /tmp). |
|
9997
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
51 |
|
23733
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
52 -f reads the names of tests from the file given as f's argument, one |
|
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
53 or more test names per line. Whitespace is ignored. Blank lines and |
|
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
54 lines beginning with '#' are ignored. This is especially useful for |
|
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
55 whittling down failures involving interactions among tests. |
| 23643 | 56 |
|
32273
95287cddbc1e
add -L flag to cause leaks(1) command to run just before exit
Skip Montanaro <skip@pobox.com>
parents:
31475
diff
changeset
|
57 -L causes the leaks(1) command to be run just before exit if it exists. |
|
95287cddbc1e
add -L flag to cause leaks(1) command to run just before exit
Skip Montanaro <skip@pobox.com>
parents:
31475
diff
changeset
|
58 leaks(1) is available on Mac OS X and presumably on some other |
|
95287cddbc1e
add -L flag to cause leaks(1) command to run just before exit
Skip Montanaro <skip@pobox.com>
parents:
31475
diff
changeset
|
59 FreeBSD-derived systems. |
|
95287cddbc1e
add -L flag to cause leaks(1) command to run just before exit
Skip Montanaro <skip@pobox.com>
parents:
31475
diff
changeset
|
60 |
|
32924
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
61 -R runs each test several times and examines sys.gettotalrefcount() to |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
62 see if the test appears to be leaking references. The argument should |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
63 be of the form stab:run:fname where 'stab' is the number of times the |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
64 test is run to let gettotalrefcount settle down, 'run' is the number |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
65 of times further it is run and 'fname' is the name of the file the |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
66 reports are written to. These parameters all have defaults (5, 4 and |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
67 "reflog.txt" respectively), so the minimal invocation is '-R ::'. |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
68 |
|
37992
8dc2a4d8a22e
The result of SF patch #1471578: big-memory tests for strings, lists and
Thomas Wouters <thomas@python.org>
parents:
37694
diff
changeset
|
69 -M runs tests that require an exorbitant amount of memory. These tests |
|
8dc2a4d8a22e
The result of SF patch #1471578: big-memory tests for strings, lists and
Thomas Wouters <thomas@python.org>
parents:
37694
diff
changeset
|
70 typically try to ascertain containers keep working when containing more than |
|
39417
74d23cd04421
Concatenation on a long string breaks (SF #1526585).
Armin Rigo <arigo@tunes.org>
parents:
38902
diff
changeset
|
71 2 billion objects, which only works on 64-bit systems. There are also some |
|
74d23cd04421
Concatenation on a long string breaks (SF #1526585).
Armin Rigo <arigo@tunes.org>
parents:
38902
diff
changeset
|
72 tests that try to exhaust the address space of the process, which only makes |
|
74d23cd04421
Concatenation on a long string breaks (SF #1526585).
Armin Rigo <arigo@tunes.org>
parents:
38902
diff
changeset
|
73 sense on 32-bit systems with at least 2Gb of memory. The passed-in memlimit, |
|
37992
8dc2a4d8a22e
The result of SF patch #1471578: big-memory tests for strings, lists and
Thomas Wouters <thomas@python.org>
parents:
37694
diff
changeset
|
74 which is a string in the form of '2.5Gb', determines howmuch memory the |
|
8dc2a4d8a22e
The result of SF patch #1471578: big-memory tests for strings, lists and
Thomas Wouters <thomas@python.org>
parents:
37694
diff
changeset
|
75 tests will limit themselves to (but they may go slightly over.) The number |
|
8dc2a4d8a22e
The result of SF patch #1471578: big-memory tests for strings, lists and
Thomas Wouters <thomas@python.org>
parents:
37694
diff
changeset
|
76 shouldn't be more memory than the machine has (including swap memory). You |
|
8dc2a4d8a22e
The result of SF patch #1471578: big-memory tests for strings, lists and
Thomas Wouters <thomas@python.org>
parents:
37694
diff
changeset
|
77 should also keep in mind that swap memory is generally much, much slower |
|
8dc2a4d8a22e
The result of SF patch #1471578: big-memory tests for strings, lists and
Thomas Wouters <thomas@python.org>
parents:
37694
diff
changeset
|
78 than RAM, and setting memlimit to all available RAM or higher will heavily |
|
8dc2a4d8a22e
The result of SF patch #1471578: big-memory tests for strings, lists and
Thomas Wouters <thomas@python.org>
parents:
37694
diff
changeset
|
79 tax the machine. On the other hand, it is no use running these tests with a |
|
8dc2a4d8a22e
The result of SF patch #1471578: big-memory tests for strings, lists and
Thomas Wouters <thomas@python.org>
parents:
37694
diff
changeset
|
80 limit of less than 2.5Gb, and many require more than 20Gb. Tests that expect |
|
8dc2a4d8a22e
The result of SF patch #1471578: big-memory tests for strings, lists and
Thomas Wouters <thomas@python.org>
parents:
37694
diff
changeset
|
81 to use more than memlimit memory will be skipped. The big-memory tests |
|
8dc2a4d8a22e
The result of SF patch #1471578: big-memory tests for strings, lists and
Thomas Wouters <thomas@python.org>
parents:
37694
diff
changeset
|
82 generally run very, very long. |
|
8dc2a4d8a22e
The result of SF patch #1471578: big-memory tests for strings, lists and
Thomas Wouters <thomas@python.org>
parents:
37694
diff
changeset
|
83 |
|
23733
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
84 -u is used to specify which special resource intensive tests to run, |
|
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
85 such as those requiring large file support or network connectivity. |
|
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
86 The argument is a comma-separated list of words indicating the |
|
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
87 resources to test. Currently only the following are defined: |
|
19417
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
88 |
|
22951
6a36112a3dce
Added the resource name "all" to enable all of the optional resource uses.
Fred Drake <fdrake@acm.org>
parents:
22723
diff
changeset
|
89 all - Enable all special resources. |
|
6a36112a3dce
Added the resource name "all" to enable all of the optional resource uses.
Fred Drake <fdrake@acm.org>
parents:
22723
diff
changeset
|
90 |
|
28277
1028dc6807a5
Add 'audio' resource.
Guido van Rossum <guido@python.org>
parents:
28225
diff
changeset
|
91 audio - Tests that use the audio device. (There are known |
|
1028dc6807a5
Add 'audio' resource.
Guido van Rossum <guido@python.org>
parents:
28225
diff
changeset
|
92 cases of broken audio drivers that can crash Python or |
|
1028dc6807a5
Add 'audio' resource.
Guido van Rossum <guido@python.org>
parents:
28225
diff
changeset
|
93 even the Linux kernel.) |
|
1028dc6807a5
Add 'audio' resource.
Guido van Rossum <guido@python.org>
parents:
28225
diff
changeset
|
94 |
|
20610
7dcc8a28133a
Patch #473187: Add a test script that exercises most of the functions in
Andrew M. Kuchling <amk@amk.ca>
parents:
20547
diff
changeset
|
95 curses - Tests that use curses and will modify the terminal's |
|
7dcc8a28133a
Patch #473187: Add a test script that exercises most of the functions in
Andrew M. Kuchling <amk@amk.ca>
parents:
20547
diff
changeset
|
96 state and output modes. |
|
20765
3a07bd2b0386
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
20654
diff
changeset
|
97 |
|
47893
4800dd22f455
make regrtest aware of the lib2to3 resource
Benjamin Peterson <benjamin@python.org>
parents:
47773
diff
changeset
|
98 lib2to3 - Run the tests for 2to3 (They take a while.) |
|
4800dd22f455
make regrtest aware of the lib2to3 resource
Benjamin Peterson <benjamin@python.org>
parents:
47773
diff
changeset
|
99 |
|
23733
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
100 largefile - It is okay to run some test that may create huge |
|
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
101 files. These tests can take a long time and may |
|
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
102 consume >2GB of disk space temporarily. |
|
19417
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
103 |
|
23733
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
104 network - It is okay to run tests that use external network |
|
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
105 resource, e.g. testing SSL support for sockets. |
|
26288
b0b608598170
Importing test suite from bsddb3 3.4.0 (with modifications).
Martin v. Löwis <martin@v.loewis.de>
parents:
25825
diff
changeset
|
106 |
|
b0b608598170
Importing test suite from bsddb3 3.4.0 (with modifications).
Martin v. Löwis <martin@v.loewis.de>
parents:
25825
diff
changeset
|
107 bsddb - It is okay to run the bsddb testsuite, which takes |
|
b0b608598170
Importing test suite from bsddb3 3.4.0 (with modifications).
Martin v. Löwis <martin@v.loewis.de>
parents:
25825
diff
changeset
|
108 a long time to complete. |
|
26429
4bee33790940
Add a way to say "use any resource except A". For example, to run
Fred Drake <fdrake@acm.org>
parents:
26392
diff
changeset
|
109 |
|
32451
d2c1c7ae7cf4
Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
32273
diff
changeset
|
110 decimal - Test the decimal module against a large suite that |
|
d2c1c7ae7cf4
Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
32273
diff
changeset
|
111 verifies compliance with standards. |
|
d2c1c7ae7cf4
Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
32273
diff
changeset
|
112 |
|
33022
2c93fceee42d
Add a trivial test for the compiler package, guarded by compiler resource.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
32948
diff
changeset
|
113 compiler - Test the compiler package by compiling all the source |
|
2c93fceee42d
Add a trivial test for the compiler package, guarded by compiler resource.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
32948
diff
changeset
|
114 in the standard library and test suite. This takes |
|
35058
8076424d455d
Add untokenize() function to allow full round-trip tokenization.
Raymond Hettinger <python@rcn.com>
parents:
35003
diff
changeset
|
115 a long time. Enabling this resource also allows |
|
8076424d455d
Add untokenize() function to allow full round-trip tokenization.
Raymond Hettinger <python@rcn.com>
parents:
35003
diff
changeset
|
116 test_tokenize to verify round-trip lexing on every |
|
8076424d455d
Add untokenize() function to allow full round-trip tokenization.
Raymond Hettinger <python@rcn.com>
parents:
35003
diff
changeset
|
117 file in the test library. |
|
33022
2c93fceee42d
Add a trivial test for the compiler package, guarded by compiler resource.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
32948
diff
changeset
|
118 |
|
35003
52fed2d0641a
whitespace normalisation
Anthony Baxter <anthonybaxter@gmail.com>
parents:
34674
diff
changeset
|
119 subprocess Run all tests for the subprocess module. |
|
34674
7a1a8ec6dc53
Only run extensive subprocess tests if -usubprocess to regrtest is specified. Fixes #1124637
Peter Astrand <astrand@lysator.liu.se>
parents:
33986
diff
changeset
|
120 |
|
35998
96d1fa36964d
Patch #1276356: Implement new resource "urlfetch" for regrtest.
Hye-Shik Chang <hyeshik@gmail.com>
parents:
35942
diff
changeset
|
121 urlfetch - It is okay to download files required on testing. |
|
96d1fa36964d
Patch #1276356: Implement new resource "urlfetch" for regrtest.
Hye-Shik Chang <hyeshik@gmail.com>
parents:
35942
diff
changeset
|
122 |
|
51140
0a8a7c457f1b
Issue #5083: New 'gui' resource for regrtest.
Guilherme Polo <ggpolo@gmail.com>
parents:
51138
diff
changeset
|
123 gui - Run tests that require a running GUI. |
|
0a8a7c457f1b
Issue #5083: New 'gui' resource for regrtest.
Guilherme Polo <ggpolo@gmail.com>
parents:
51138
diff
changeset
|
124 |
|
53000
9a7317ce6db9
Issue 5665: add more pickling tests.
Collin Winter <collinw@gmail.com>
parents:
52574
diff
changeset
|
125 xpickle - Test pickle and cPickle against Python 2.4, 2.5 and 2.6 to |
|
9a7317ce6db9
Issue 5665: add more pickling tests.
Collin Winter <collinw@gmail.com>
parents:
52574
diff
changeset
|
126 test backwards compatibility. These tests take a long time |
|
9a7317ce6db9
Issue 5665: add more pickling tests.
Collin Winter <collinw@gmail.com>
parents:
52574
diff
changeset
|
127 to run. |
|
9a7317ce6db9
Issue 5665: add more pickling tests.
Collin Winter <collinw@gmail.com>
parents:
52574
diff
changeset
|
128 |
|
26429
4bee33790940
Add a way to say "use any resource except A". For example, to run
Fred Drake <fdrake@acm.org>
parents:
26392
diff
changeset
|
129 To enable all resources except one, use '-uall,-<resource>'. For |
|
4bee33790940
Add a way to say "use any resource except A". For example, to run
Fred Drake <fdrake@acm.org>
parents:
26392
diff
changeset
|
130 example, to run all the tests except for the bsddb tests, give the |
|
4bee33790940
Add a way to say "use any resource except A". For example, to run
Fred Drake <fdrake@acm.org>
parents:
26392
diff
changeset
|
131 option '-uall,-bsddb'. |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
132 """ |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
133 |
|
45840
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
134 import cStringIO |
|
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
135 import getopt |
|
31475
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
136 import os |
|
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
137 import random |
|
45840
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
138 import re |
|
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
139 import sys |
|
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
140 import time |
|
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
141 import traceback |
|
31475
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
142 import warnings |
|
52353
e6009b9cd908
remove test_support.TestSkipped and just use unittest.SkipTest
Benjamin Peterson <benjamin@python.org>
parents:
51487
diff
changeset
|
143 import unittest |
|
24771
1824983fd94a
Suppress warnings about test_grammar.py that can't be suppressed inside
Guido van Rossum <guido@python.org>
parents:
24442
diff
changeset
|
144 |
|
1824983fd94a
Suppress warnings about test_grammar.py that can't be suppressed inside
Guido van Rossum <guido@python.org>
parents:
24442
diff
changeset
|
145 # I see no other way to suppress these warnings; |
|
1824983fd94a
Suppress warnings about test_grammar.py that can't be suppressed inside
Guido van Rossum <guido@python.org>
parents:
24442
diff
changeset
|
146 # putting them in test_grammar.py has no effect: |
|
24829
31ee32c23d29
The filterwarnings() call here should be updated to filter out
Guido van Rossum <guido@python.org>
parents:
24771
diff
changeset
|
147 warnings.filterwarnings("ignore", "hex/oct constants", FutureWarning, |
|
24771
1824983fd94a
Suppress warnings about test_grammar.py that can't be suppressed inside
Guido van Rossum <guido@python.org>
parents:
24442
diff
changeset
|
148 ".*test.test_grammar$") |
|
25326
0739046a0c3a
Suppress hex/oct constant warnings in <string> on 64-bit platforms,
Guido van Rossum <guido@python.org>
parents:
25252
diff
changeset
|
149 if sys.maxint > 0x7fffffff: |
|
0739046a0c3a
Suppress hex/oct constant warnings in <string> on 64-bit platforms,
Guido van Rossum <guido@python.org>
parents:
25252
diff
changeset
|
150 # Also suppress them in <string>, because for 64-bit platforms, |
|
0739046a0c3a
Suppress hex/oct constant warnings in <string> on 64-bit platforms,
Guido van Rossum <guido@python.org>
parents:
25252
diff
changeset
|
151 # that's where test_grammar.py hides them. |
|
0739046a0c3a
Suppress hex/oct constant warnings in <string> on 64-bit platforms,
Guido van Rossum <guido@python.org>
parents:
25252
diff
changeset
|
152 warnings.filterwarnings("ignore", "hex/oct constants", FutureWarning, |
|
0739046a0c3a
Suppress hex/oct constant warnings in <string> on 64-bit platforms,
Guido van Rossum <guido@python.org>
parents:
25252
diff
changeset
|
153 "<string>") |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
154 |
|
38018
b5e7d5b3c442
- Add new Warning class, ImportWarning
Thomas Wouters <thomas@python.org>
parents:
37992
diff
changeset
|
155 # Ignore ImportWarnings that only occur in the source tree, |
|
b5e7d5b3c442
- Add new Warning class, ImportWarning
Thomas Wouters <thomas@python.org>
parents:
37992
diff
changeset
|
156 # (because of modules with the same name as source-directories in Modules/) |
|
38019
3845f70e0baf
Add more ignores of ImportWarnings; these are all just potential triggers
Thomas Wouters <thomas@python.org>
parents:
38018
diff
changeset
|
157 for mod in ("ctypes", "gzip", "zipfile", "tarfile", "encodings.zlib_codec", |
|
3845f70e0baf
Add more ignores of ImportWarnings; these are all just potential triggers
Thomas Wouters <thomas@python.org>
parents:
38018
diff
changeset
|
158 "test.test_zipimport", "test.test_zlib", "test.test_zipfile", |
|
3845f70e0baf
Add more ignores of ImportWarnings; these are all just potential triggers
Thomas Wouters <thomas@python.org>
parents:
38018
diff
changeset
|
159 "test.test_codecs", "test.string_tests"): |
|
38018
b5e7d5b3c442
- Add new Warning class, ImportWarning
Thomas Wouters <thomas@python.org>
parents:
37992
diff
changeset
|
160 warnings.filterwarnings(module=".*%s$" % (mod,), |
|
b5e7d5b3c442
- Add new Warning class, ImportWarning
Thomas Wouters <thomas@python.org>
parents:
37992
diff
changeset
|
161 action="ignore", category=ImportWarning) |
|
b5e7d5b3c442
- Add new Warning class, ImportWarning
Thomas Wouters <thomas@python.org>
parents:
37992
diff
changeset
|
162 |
|
26492
238cac97d165
On Max OSX, try increasing the stack limit to 2048 so test_re and
Guido van Rossum <guido@python.org>
parents:
26429
diff
changeset
|
163 # MacOSX (a.k.a. Darwin) has a default stack size that is too small |
|
238cac97d165
On Max OSX, try increasing the stack limit to 2048 so test_re and
Guido van Rossum <guido@python.org>
parents:
26429
diff
changeset
|
164 # for deeply recursive regular expressions. We see this as crashes in |
|
238cac97d165
On Max OSX, try increasing the stack limit to 2048 so test_re and
Guido van Rossum <guido@python.org>
parents:
26429
diff
changeset
|
165 # the Python test suite when running test_re.py and test_sre.py. The |
|
238cac97d165
On Max OSX, try increasing the stack limit to 2048 so test_re and
Guido van Rossum <guido@python.org>
parents:
26429
diff
changeset
|
166 # fix is to set the stack limit to 2048. |
|
238cac97d165
On Max OSX, try increasing the stack limit to 2048 so test_re and
Guido van Rossum <guido@python.org>
parents:
26429
diff
changeset
|
167 # This approach may also be useful for other Unixy platforms that |
|
238cac97d165
On Max OSX, try increasing the stack limit to 2048 so test_re and
Guido van Rossum <guido@python.org>
parents:
26429
diff
changeset
|
168 # suffer from small default stack limits. |
|
238cac97d165
On Max OSX, try increasing the stack limit to 2048 so test_re and
Guido van Rossum <guido@python.org>
parents:
26429
diff
changeset
|
169 if sys.platform == 'darwin': |
|
238cac97d165
On Max OSX, try increasing the stack limit to 2048 so test_re and
Guido van Rossum <guido@python.org>
parents:
26429
diff
changeset
|
170 try: |
|
238cac97d165
On Max OSX, try increasing the stack limit to 2048 so test_re and
Guido van Rossum <guido@python.org>
parents:
26429
diff
changeset
|
171 import resource |
|
238cac97d165
On Max OSX, try increasing the stack limit to 2048 so test_re and
Guido van Rossum <guido@python.org>
parents:
26429
diff
changeset
|
172 except ImportError: |
|
238cac97d165
On Max OSX, try increasing the stack limit to 2048 so test_re and
Guido van Rossum <guido@python.org>
parents:
26429
diff
changeset
|
173 pass |
|
238cac97d165
On Max OSX, try increasing the stack limit to 2048 so test_re and
Guido van Rossum <guido@python.org>
parents:
26429
diff
changeset
|
174 else: |
|
238cac97d165
On Max OSX, try increasing the stack limit to 2048 so test_re and
Guido van Rossum <guido@python.org>
parents:
26429
diff
changeset
|
175 soft, hard = resource.getrlimit(resource.RLIMIT_STACK) |
|
238cac97d165
On Max OSX, try increasing the stack limit to 2048 so test_re and
Guido van Rossum <guido@python.org>
parents:
26429
diff
changeset
|
176 newsoft = min(hard, max(soft, 1024*2048)) |
|
238cac97d165
On Max OSX, try increasing the stack limit to 2048 so test_re and
Guido van Rossum <guido@python.org>
parents:
26429
diff
changeset
|
177 resource.setrlimit(resource.RLIMIT_STACK, (newsoft, hard)) |
|
238cac97d165
On Max OSX, try increasing the stack limit to 2048 so test_re and
Guido van Rossum <guido@python.org>
parents:
26429
diff
changeset
|
178 |
|
24364
aa0d2d51fbde
Get rid of relative imports in all unittests. Now anything that
Barry Warsaw <barry@python.org>
parents:
24277
diff
changeset
|
179 from test import test_support |
|
22951
6a36112a3dce
Added the resource name "all" to enable all of the optional resource uses.
Fred Drake <fdrake@acm.org>
parents:
22723
diff
changeset
|
180 |
|
48017
9576bb71a01b
now that test_lib2to3 actually works and isn't extremely slow, we don't need the lib2to3 resource
Benjamin Peterson <benjamin@python.org>
parents:
47894
diff
changeset
|
181 RESOURCE_NAMES = ('audio', 'curses', 'largefile', 'network', 'bsddb', |
|
53000
9a7317ce6db9
Issue 5665: add more pickling tests.
Collin Winter <collinw@gmail.com>
parents:
52574
diff
changeset
|
182 'decimal', 'compiler', 'subprocess', 'urlfetch', 'gui', |
|
9a7317ce6db9
Issue 5665: add more pickling tests.
Collin Winter <collinw@gmail.com>
parents:
52574
diff
changeset
|
183 'xpickle') |
|
22951
6a36112a3dce
Added the resource name "all" to enable all of the optional resource uses.
Fred Drake <fdrake@acm.org>
parents:
22723
diff
changeset
|
184 |
|
6a36112a3dce
Added the resource name "all" to enable all of the optional resource uses.
Fred Drake <fdrake@acm.org>
parents:
22723
diff
changeset
|
185 |
|
19417
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
186 def usage(code, msg=''): |
|
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
187 print __doc__ |
|
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
188 if msg: print msg |
|
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
189 sys.exit(code) |
|
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
190 |
|
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
191 |
|
46192
6e02ff0bd6f8
Now that Lib/test/output is gone, tests should not print anything,
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46144
diff
changeset
|
192 def main(tests=None, testdir=None, verbose=0, quiet=False, |
|
31475
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
193 exclude=False, single=False, randomize=False, fromfile=None, |
|
33982
468a10ebbcd5
Add options to regrtest.py to make it possible to specify where to put
Walter Dörwald <walter@livinglogic.de>
parents:
33374
diff
changeset
|
194 findleaks=False, use_resources=None, trace=False, coverdir='coverage', |
|
52398
9134a2091013
Add the ability to control the random seed used by regrtest.py -r.
Collin Winter <collinw@gmail.com>
parents:
52353
diff
changeset
|
195 runleaks=False, huntrleaks=False, verbose2=False, print_slow=False, |
|
9134a2091013
Add the ability to control the random seed used by regrtest.py -r.
Collin Winter <collinw@gmail.com>
parents:
52353
diff
changeset
|
196 random_seed=None): |
|
8803
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
197 """Execute a test suite. |
|
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
198 |
|
13620
5b727ab37092
Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either
Thomas Wouters <thomas@python.org>
parents:
13535
diff
changeset
|
199 This also parses command-line options and modifies its behavior |
|
15305
07f24261c6e6
Make reindent.py happy (convert everything to 4-space indents!).
Fred Drake <fdrake@acm.org>
parents:
15199
diff
changeset
|
200 accordingly. |
|
8803
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
201 |
|
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
202 tests -- a list of strings containing test names (optional) |
|
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
203 testdir -- the directory in which to look for tests (optional) |
|
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
204 |
|
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
205 Users other than the Python test suite will certainly want to |
|
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
206 specify testdir; if it's omitted, the directory containing the |
|
15305
07f24261c6e6
Make reindent.py happy (convert everything to 4-space indents!).
Fred Drake <fdrake@acm.org>
parents:
15199
diff
changeset
|
207 Python test suite is searched for. |
|
8803
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
208 |
|
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
209 If the tests argument is omitted, the tests listed on the |
|
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
210 command-line will be used. If that's empty, too, then all *.py |
|
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
211 files beginning with test_ will be used. |
|
13230
7066be2edc3b
* added a randomize flag and corresponding -r command line argument that
Skip Montanaro <skip@pobox.com>
parents:
12585
diff
changeset
|
212 |
|
46192
6e02ff0bd6f8
Now that Lib/test/output is gone, tests should not print anything,
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46144
diff
changeset
|
213 The other default arguments (verbose, quiet, exclude, |
|
52398
9134a2091013
Add the ability to control the random seed used by regrtest.py -r.
Collin Winter <collinw@gmail.com>
parents:
52353
diff
changeset
|
214 single, randomize, findleaks, use_resources, trace, coverdir, print_slow and |
|
9134a2091013
Add the ability to control the random seed used by regrtest.py -r.
Collin Winter <collinw@gmail.com>
parents:
52353
diff
changeset
|
215 random_seed) allow programmers calling main() directly to set the |
|
45840
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
216 values that would normally be set by flags on the command line. |
|
8803
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
217 """ |
|
15305
07f24261c6e6
Make reindent.py happy (convert everything to 4-space indents!).
Fred Drake <fdrake@acm.org>
parents:
15199
diff
changeset
|
218 |
|
20091
40d4d1cd6c84
Guido points out that sys.__stdout__ is a bit bucket under IDLE. So keep
Tim Peters <tim.peters@gmail.com>
parents:
20088
diff
changeset
|
219 test_support.record_original_stdout(sys.stdout) |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
220 try: |
|
45840
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
221 opts, args = getopt.getopt(sys.argv[1:], 'hvgqxsSrf:lu:t:TD:NLR:wM:', |
|
45825
a7bb004e7f06
The output directory for tests that compare against stdout is now gone!
Brett Cannon <bcannon@gmail.com>
parents:
45634
diff
changeset
|
222 ['help', 'verbose', 'quiet', 'exclude', |
|
45840
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
223 'single', 'slow', 'random', 'fromfile', |
|
31475
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
224 'findleaks', 'use=', 'threshold=', 'trace', |
|
33982
468a10ebbcd5
Add options to regrtest.py to make it possible to specify where to put
Walter Dörwald <walter@livinglogic.de>
parents:
33374
diff
changeset
|
225 'coverdir=', 'nocoverdir', 'runleaks', |
|
37992
8dc2a4d8a22e
The result of SF patch #1471578: big-memory tests for strings, lists and
Thomas Wouters <thomas@python.org>
parents:
37694
diff
changeset
|
226 'huntrleaks=', 'verbose2', 'memlimit=', |
|
52398
9134a2091013
Add the ability to control the random seed used by regrtest.py -r.
Collin Winter <collinw@gmail.com>
parents:
52353
diff
changeset
|
227 'randseed=' |
|
31475
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
228 ]) |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
229 except getopt.error, msg: |
|
19417
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
230 usage(2, msg) |
|
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
231 |
|
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
232 # Defaults |
|
52398
9134a2091013
Add the ability to control the random seed used by regrtest.py -r.
Collin Winter <collinw@gmail.com>
parents:
52353
diff
changeset
|
233 if random_seed is None: |
|
9134a2091013
Add the ability to control the random seed used by regrtest.py -r.
Collin Winter <collinw@gmail.com>
parents:
52353
diff
changeset
|
234 random_seed = random.randrange(10000000) |
|
19417
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
235 if use_resources is None: |
|
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
236 use_resources = [] |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
237 for o, a in opts: |
|
19417
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
238 if o in ('-h', '--help'): |
|
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
239 usage(0) |
|
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
240 elif o in ('-v', '--verbose'): |
|
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
241 verbose += 1 |
|
36933
ebeba7353894
Add regrtest -w option.
Martin v. Löwis <martin@v.loewis.de>
parents:
36719
diff
changeset
|
242 elif o in ('-w', '--verbose2'): |
|
ebeba7353894
Add regrtest -w option.
Martin v. Löwis <martin@v.loewis.de>
parents:
36719
diff
changeset
|
243 verbose2 = True |
|
19417
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
244 elif o in ('-q', '--quiet'): |
|
31475
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
245 quiet = True; |
|
19417
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
246 verbose = 0 |
|
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
247 elif o in ('-x', '--exclude'): |
|
31475
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
248 exclude = True |
|
19417
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
249 elif o in ('-s', '--single'): |
|
31475
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
250 single = True |
|
45840
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
251 elif o in ('-S', '--slow'): |
|
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
252 print_slow = True |
|
19417
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
253 elif o in ('-r', '--randomize'): |
|
31475
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
254 randomize = True |
|
52398
9134a2091013
Add the ability to control the random seed used by regrtest.py -r.
Collin Winter <collinw@gmail.com>
parents:
52353
diff
changeset
|
255 elif o == '--randseed': |
|
9134a2091013
Add the ability to control the random seed used by regrtest.py -r.
Collin Winter <collinw@gmail.com>
parents:
52353
diff
changeset
|
256 random_seed = int(a) |
| 23643 | 257 elif o in ('-f', '--fromfile'): |
| 258 fromfile = a | |
|
19417
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
259 elif o in ('-l', '--findleaks'): |
|
31475
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
260 findleaks = True |
|
32273
95287cddbc1e
add -L flag to cause leaks(1) command to run just before exit
Skip Montanaro <skip@pobox.com>
parents:
31475
diff
changeset
|
261 elif o in ('-L', '--runleaks'): |
|
95287cddbc1e
add -L flag to cause leaks(1) command to run just before exit
Skip Montanaro <skip@pobox.com>
parents:
31475
diff
changeset
|
262 runleaks = True |
|
23733
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
263 elif o in ('-t', '--threshold'): |
|
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
264 import gc |
|
7eaabe77d5cb
Added -t (--threshold) option to call gc.set_threshold(N).
Guido van Rossum <guido@python.org>
parents:
23643
diff
changeset
|
265 gc.set_threshold(int(a)) |
|
31475
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
266 elif o in ('-T', '--coverage'): |
|
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
267 trace = True |
|
33982
468a10ebbcd5
Add options to regrtest.py to make it possible to specify where to put
Walter Dörwald <walter@livinglogic.de>
parents:
33374
diff
changeset
|
268 elif o in ('-D', '--coverdir'): |
|
468a10ebbcd5
Add options to regrtest.py to make it possible to specify where to put
Walter Dörwald <walter@livinglogic.de>
parents:
33374
diff
changeset
|
269 coverdir = os.path.join(os.getcwd(), a) |
|
468a10ebbcd5
Add options to regrtest.py to make it possible to specify where to put
Walter Dörwald <walter@livinglogic.de>
parents:
33374
diff
changeset
|
270 elif o in ('-N', '--nocoverdir'): |
|
468a10ebbcd5
Add options to regrtest.py to make it possible to specify where to put
Walter Dörwald <walter@livinglogic.de>
parents:
33374
diff
changeset
|
271 coverdir = None |
|
32924
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
272 elif o in ('-R', '--huntrleaks'): |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
273 huntrleaks = a.split(':') |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
274 if len(huntrleaks) != 3: |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
275 print a, huntrleaks |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
276 usage(2, '-R takes three colon-separated arguments') |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
277 if len(huntrleaks[0]) == 0: |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
278 huntrleaks[0] = 5 |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
279 else: |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
280 huntrleaks[0] = int(huntrleaks[0]) |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
281 if len(huntrleaks[1]) == 0: |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
282 huntrleaks[1] = 4 |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
283 else: |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
284 huntrleaks[1] = int(huntrleaks[1]) |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
285 if len(huntrleaks[2]) == 0: |
|
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
286 huntrleaks[2] = "reflog.txt" |
|
37992
8dc2a4d8a22e
The result of SF patch #1471578: big-memory tests for strings, lists and
Thomas Wouters <thomas@python.org>
parents:
37694
diff
changeset
|
287 elif o in ('-M', '--memlimit'): |
|
8dc2a4d8a22e
The result of SF patch #1471578: big-memory tests for strings, lists and
Thomas Wouters <thomas@python.org>
parents:
37694
diff
changeset
|
288 test_support.set_memlimit(a) |
|
19417
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
289 elif o in ('-u', '--use'): |
|
19768
d4f53b1fb424
Two small changes to the resource usage option:
Guido van Rossum <guido@python.org>
parents:
19729
diff
changeset
|
290 u = [x.lower() for x in a.split(',')] |
|
d4f53b1fb424
Two small changes to the resource usage option:
Guido van Rossum <guido@python.org>
parents:
19729
diff
changeset
|
291 for r in u: |
|
22951
6a36112a3dce
Added the resource name "all" to enable all of the optional resource uses.
Fred Drake <fdrake@acm.org>
parents:
22723
diff
changeset
|
292 if r == 'all': |
|
26429
4bee33790940
Add a way to say "use any resource except A". For example, to run
Fred Drake <fdrake@acm.org>
parents:
26392
diff
changeset
|
293 use_resources[:] = RESOURCE_NAMES |
|
4bee33790940
Add a way to say "use any resource except A". For example, to run
Fred Drake <fdrake@acm.org>
parents:
26392
diff
changeset
|
294 continue |
|
4bee33790940
Add a way to say "use any resource except A". For example, to run
Fred Drake <fdrake@acm.org>
parents:
26392
diff
changeset
|
295 remove = False |
|
4bee33790940
Add a way to say "use any resource except A". For example, to run
Fred Drake <fdrake@acm.org>
parents:
26392
diff
changeset
|
296 if r[0] == '-': |
|
4bee33790940
Add a way to say "use any resource except A". For example, to run
Fred Drake <fdrake@acm.org>
parents:
26392
diff
changeset
|
297 remove = True |
|
4bee33790940
Add a way to say "use any resource except A". For example, to run
Fred Drake <fdrake@acm.org>
parents:
26392
diff
changeset
|
298 r = r[1:] |
|
22951
6a36112a3dce
Added the resource name "all" to enable all of the optional resource uses.
Fred Drake <fdrake@acm.org>
parents:
22723
diff
changeset
|
299 if r not in RESOURCE_NAMES: |
|
6a36112a3dce
Added the resource name "all" to enable all of the optional resource uses.
Fred Drake <fdrake@acm.org>
parents:
22723
diff
changeset
|
300 usage(1, 'Invalid -u/--use option: ' + a) |
|
26429
4bee33790940
Add a way to say "use any resource except A". For example, to run
Fred Drake <fdrake@acm.org>
parents:
26392
diff
changeset
|
301 if remove: |
|
4bee33790940
Add a way to say "use any resource except A". For example, to run
Fred Drake <fdrake@acm.org>
parents:
26392
diff
changeset
|
302 if r in use_resources: |
|
4bee33790940
Add a way to say "use any resource except A". For example, to run
Fred Drake <fdrake@acm.org>
parents:
26392
diff
changeset
|
303 use_resources.remove(r) |
|
4bee33790940
Add a way to say "use any resource except A". For example, to run
Fred Drake <fdrake@acm.org>
parents:
26392
diff
changeset
|
304 elif r not in use_resources: |
|
23316
133763332767
Fred's recent changes to support "-u all" resulted in subset resource
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents:
23264
diff
changeset
|
305 use_resources.append(r) |
| 23643 | 306 if single and fromfile: |
| 307 usage(2, "-s and -f don't go together!") | |
|
19417
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
308 |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
309 good = [] |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
310 bad = [] |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
311 skipped = [] |
|
27636
974f196abb87
test_support.requires(): Instead of raising TestSkipped, raise a new
Fred Drake <fdrake@acm.org>
parents:
27629
diff
changeset
|
312 resource_denieds = [] |
|
9997
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
313 |
|
14758
a86568f54375
- Replace debugleak flag with findleaks flag. The new SAVEALL GC option is
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
14141
diff
changeset
|
314 if findleaks: |
|
13826
c63863abe1aa
Added a -l/--leakdebug option which turns on DEBUG_LEAK if the gc
Barry Warsaw <barry@python.org>
parents:
13620
diff
changeset
|
315 try: |
|
c63863abe1aa
Added a -l/--leakdebug option which turns on DEBUG_LEAK if the gc
Barry Warsaw <barry@python.org>
parents:
13620
diff
changeset
|
316 import gc |
|
c63863abe1aa
Added a -l/--leakdebug option which turns on DEBUG_LEAK if the gc
Barry Warsaw <barry@python.org>
parents:
13620
diff
changeset
|
317 except ImportError: |
|
15199
77ea8fcef24c
Make the regrtest.py -l (findleaks) option considerably less obnoxious.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
14758
diff
changeset
|
318 print 'No GC available, disabling findleaks.' |
|
31475
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
319 findleaks = False |
|
13826
c63863abe1aa
Added a -l/--leakdebug option which turns on DEBUG_LEAK if the gc
Barry Warsaw <barry@python.org>
parents:
13620
diff
changeset
|
320 else: |
|
15199
77ea8fcef24c
Make the regrtest.py -l (findleaks) option considerably less obnoxious.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
14758
diff
changeset
|
321 # Uncomment the line below to report garbage that is not |
|
77ea8fcef24c
Make the regrtest.py -l (findleaks) option considerably less obnoxious.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
14758
diff
changeset
|
322 # freeable by reference counting alone. By default only |
|
77ea8fcef24c
Make the regrtest.py -l (findleaks) option considerably less obnoxious.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
14758
diff
changeset
|
323 # garbage that is not collectable by the GC is reported. |
|
77ea8fcef24c
Make the regrtest.py -l (findleaks) option considerably less obnoxious.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
14758
diff
changeset
|
324 #gc.set_debug(gc.DEBUG_SAVEALL) |
|
14758
a86568f54375
- Replace debugleak flag with findleaks flag. The new SAVEALL GC option is
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
14141
diff
changeset
|
325 found_garbage = [] |
|
13826
c63863abe1aa
Added a -l/--leakdebug option which turns on DEBUG_LEAK if the gc
Barry Warsaw <barry@python.org>
parents:
13620
diff
changeset
|
326 |
|
9997
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
327 if single: |
|
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
328 from tempfile import gettempdir |
|
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
329 filename = os.path.join(gettempdir(), 'pynexttest') |
|
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
330 try: |
|
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
331 fp = open(filename, 'r') |
|
16517
eee67a84e5fa
String method conversion.
Eric S. Raymond <esr@thyrsus.com>
parents:
15676
diff
changeset
|
332 next = fp.read().strip() |
|
9997
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
333 tests = [next] |
|
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
334 fp.close() |
|
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
335 except IOError: |
|
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
336 pass |
| 23643 | 337 |
| 338 if fromfile: | |
| 339 tests = [] | |
| 340 fp = open(fromfile) | |
| 341 for line in fp: | |
| 342 guts = line.split() # assuming no test has whitespace in its name | |
| 343 if guts and not guts[0].startswith('#'): | |
| 344 tests.extend(guts) | |
| 345 fp.close() | |
| 346 | |
| 347 # Strip .py extensions. | |
| 348 if args: | |
| 349 args = map(removepy, args) | |
| 350 if tests: | |
| 351 tests = map(removepy, tests) | |
| 352 | |
|
9038
24d0a57ae234
There was still something wrong. The original NOTTESTS are replaced
Guido van Rossum <guido@python.org>
parents:
9032
diff
changeset
|
353 stdtests = STDTESTS[:] |
|
24d0a57ae234
There was still something wrong. The original NOTTESTS are replaced
Guido van Rossum <guido@python.org>
parents:
9032
diff
changeset
|
354 nottests = NOTTESTS[:] |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
355 if exclude: |
|
9038
24d0a57ae234
There was still something wrong. The original NOTTESTS are replaced
Guido van Rossum <guido@python.org>
parents:
9032
diff
changeset
|
356 for arg in args: |
|
24d0a57ae234
There was still something wrong. The original NOTTESTS are replaced
Guido van Rossum <guido@python.org>
parents:
9032
diff
changeset
|
357 if arg in stdtests: |
|
24d0a57ae234
There was still something wrong. The original NOTTESTS are replaced
Guido van Rossum <guido@python.org>
parents:
9032
diff
changeset
|
358 stdtests.remove(arg) |
|
24d0a57ae234
There was still something wrong. The original NOTTESTS are replaced
Guido van Rossum <guido@python.org>
parents:
9032
diff
changeset
|
359 nottests[:0] = args |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
360 args = [] |
|
9032
baf9a5a71d2d
Should pass explicit arguments to findtests(). Should initialize 'nottests'.
Guido van Rossum <guido@python.org>
parents:
8803
diff
changeset
|
361 tests = tests or args or findtests(testdir, stdtests, nottests) |
|
9997
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
362 if single: |
|
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
363 tests = tests[:1] |
|
13230
7066be2edc3b
* added a randomize flag and corresponding -r command line argument that
Skip Montanaro <skip@pobox.com>
parents:
12585
diff
changeset
|
364 if randomize: |
|
52398
9134a2091013
Add the ability to control the random seed used by regrtest.py -r.
Collin Winter <collinw@gmail.com>
parents:
52353
diff
changeset
|
365 random.seed(random_seed) |
|
9134a2091013
Add the ability to control the random seed used by regrtest.py -r.
Collin Winter <collinw@gmail.com>
parents:
52353
diff
changeset
|
366 print "Using random seed", random_seed |
|
13230
7066be2edc3b
* added a randomize flag and corresponding -r command line argument that
Skip Montanaro <skip@pobox.com>
parents:
12585
diff
changeset
|
367 random.shuffle(tests) |
|
31475
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
368 if trace: |
|
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
369 import trace |
|
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
370 tracer = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix], |
|
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
371 trace=False, count=True) |
|
45840
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
372 test_times = [] |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
373 test_support.verbose = verbose # Tell tests to be moderately quiet |
|
19417
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
374 test_support.use_resources = use_resources |
|
12444
03b81912835e
Patch by Vladimir Marangozov to unload additionally imported modules
Guido van Rossum <guido@python.org>
parents:
9997
diff
changeset
|
375 save_modules = sys.modules.keys() |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
376 for test in tests: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
377 if not quiet: |
|
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
378 print test |
|
25252
29559e21cd53
Add a bunch of sys.stdout.flush() calls that will hopefully improve
Guido van Rossum <guido@python.org>
parents:
25001
diff
changeset
|
379 sys.stdout.flush() |
|
31475
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
380 if trace: |
|
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
381 # If we're tracing code coverage, then we don't exit with status |
|
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
382 # if on a false return value from main. |
|
46192
6e02ff0bd6f8
Now that Lib/test/output is gone, tests should not print anything,
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46144
diff
changeset
|
383 tracer.runctx('runtest(test, verbose, quiet,' |
|
45840
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
384 ' test_times, testdir)', |
|
31475
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
385 globals=globals(), locals=vars()) |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
386 else: |
|
36719
942ae25cb391
Instead of printing the exception when you interrupt a test (Ctrl-C),
Neal Norwitz <nnorwitz@gmail.com>
parents:
35998
diff
changeset
|
387 try: |
|
46192
6e02ff0bd6f8
Now that Lib/test/output is gone, tests should not print anything,
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46144
diff
changeset
|
388 ok = runtest(test, verbose, quiet, test_times, |
|
45840
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
389 testdir, huntrleaks) |
|
36719
942ae25cb391
Instead of printing the exception when you interrupt a test (Ctrl-C),
Neal Norwitz <nnorwitz@gmail.com>
parents:
35998
diff
changeset
|
390 except KeyboardInterrupt: |
|
942ae25cb391
Instead of printing the exception when you interrupt a test (Ctrl-C),
Neal Norwitz <nnorwitz@gmail.com>
parents:
35998
diff
changeset
|
391 # print a newline separate from the ^C |
|
942ae25cb391
Instead of printing the exception when you interrupt a test (Ctrl-C),
Neal Norwitz <nnorwitz@gmail.com>
parents:
35998
diff
changeset
|
392 print |
|
942ae25cb391
Instead of printing the exception when you interrupt a test (Ctrl-C),
Neal Norwitz <nnorwitz@gmail.com>
parents:
35998
diff
changeset
|
393 break |
|
942ae25cb391
Instead of printing the exception when you interrupt a test (Ctrl-C),
Neal Norwitz <nnorwitz@gmail.com>
parents:
35998
diff
changeset
|
394 except: |
|
942ae25cb391
Instead of printing the exception when you interrupt a test (Ctrl-C),
Neal Norwitz <nnorwitz@gmail.com>
parents:
35998
diff
changeset
|
395 raise |
|
31475
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
396 if ok > 0: |
|
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
397 good.append(test) |
|
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
398 elif ok == 0: |
|
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
399 bad.append(test) |
|
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
400 else: |
|
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
401 skipped.append(test) |
|
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
402 if ok == -2: |
|
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
403 resource_denieds.append(test) |
|
14758
a86568f54375
- Replace debugleak flag with findleaks flag. The new SAVEALL GC option is
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
14141
diff
changeset
|
404 if findleaks: |
|
a86568f54375
- Replace debugleak flag with findleaks flag. The new SAVEALL GC option is
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
14141
diff
changeset
|
405 gc.collect() |
|
a86568f54375
- Replace debugleak flag with findleaks flag. The new SAVEALL GC option is
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
14141
diff
changeset
|
406 if gc.garbage: |
|
15199
77ea8fcef24c
Make the regrtest.py -l (findleaks) option considerably less obnoxious.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
14758
diff
changeset
|
407 print "Warning: test created", len(gc.garbage), |
|
77ea8fcef24c
Make the regrtest.py -l (findleaks) option considerably less obnoxious.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
14758
diff
changeset
|
408 print "uncollectable object(s)." |
|
77ea8fcef24c
Make the regrtest.py -l (findleaks) option considerably less obnoxious.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
14758
diff
changeset
|
409 # move the uncollectable objects somewhere so we don't see |
|
77ea8fcef24c
Make the regrtest.py -l (findleaks) option considerably less obnoxious.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
14758
diff
changeset
|
410 # them again |
|
14758
a86568f54375
- Replace debugleak flag with findleaks flag. The new SAVEALL GC option is
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
14141
diff
changeset
|
411 found_garbage.extend(gc.garbage) |
|
a86568f54375
- Replace debugleak flag with findleaks flag. The new SAVEALL GC option is
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
14141
diff
changeset
|
412 del gc.garbage[:] |
|
12444
03b81912835e
Patch by Vladimir Marangozov to unload additionally imported modules
Guido van Rossum <guido@python.org>
parents:
9997
diff
changeset
|
413 # Unload the newly imported modules (best effort finalization) |
|
03b81912835e
Patch by Vladimir Marangozov to unload additionally imported modules
Guido van Rossum <guido@python.org>
parents:
9997
diff
changeset
|
414 for module in sys.modules.keys(): |
|
12585
0b91c3b384d8
Alas, Vladimir's patch was too aggressive, and started causing really
Guido van Rossum <guido@python.org>
parents:
12444
diff
changeset
|
415 if module not in save_modules and module.startswith("test."): |
|
12444
03b81912835e
Patch by Vladimir Marangozov to unload additionally imported modules
Guido van Rossum <guido@python.org>
parents:
9997
diff
changeset
|
416 test_support.unload(module) |
|
20497
a9b19db180a2
Make sure the output lists are sorted, even if run with -r.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
20159
diff
changeset
|
417 |
|
a9b19db180a2
Make sure the output lists are sorted, even if run with -r.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
20159
diff
changeset
|
418 # The lists won't be sorted if running with -r |
|
a9b19db180a2
Make sure the output lists are sorted, even if run with -r.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
20159
diff
changeset
|
419 good.sort() |
|
a9b19db180a2
Make sure the output lists are sorted, even if run with -r.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
20159
diff
changeset
|
420 bad.sort() |
|
a9b19db180a2
Make sure the output lists are sorted, even if run with -r.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
20159
diff
changeset
|
421 skipped.sort() |
|
20547
a12ccdbce8da
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
20497
diff
changeset
|
422 |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
423 if good and not quiet: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
424 if not bad and not skipped and len(good) > 1: |
|
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
425 print "All", |
|
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
426 print count(len(good), "test"), "OK." |
|
45840
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
427 if print_slow: |
|
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
428 test_times.sort(reverse=True) |
|
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
429 print "10 slowest tests:" |
|
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
430 for time, test in test_times[:10]: |
|
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
431 print "%s: %.1fs" % (test, time) |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
432 if bad: |
|
19193
095c89a825a9
Make the output of tests skipped readable (i.e., deliberately break it
Tim Peters <tim.peters@gmail.com>
parents:
19189
diff
changeset
|
433 print count(len(bad), "test"), "failed:" |
|
095c89a825a9
Make the output of tests skipped readable (i.e., deliberately break it
Tim Peters <tim.peters@gmail.com>
parents:
19189
diff
changeset
|
434 printlist(bad) |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
435 if skipped and not quiet: |
|
19193
095c89a825a9
Make the output of tests skipped readable (i.e., deliberately break it
Tim Peters <tim.peters@gmail.com>
parents:
19189
diff
changeset
|
436 print count(len(skipped), "test"), "skipped:" |
|
095c89a825a9
Make the output of tests skipped readable (i.e., deliberately break it
Tim Peters <tim.peters@gmail.com>
parents:
19189
diff
changeset
|
437 printlist(skipped) |
|
9997
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
438 |
|
19186
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
439 e = _ExpectedSkips() |
|
19188
bcfe30cd1f0d
Move line; reported on python-dev by Mark Favas (thanks!).
Tim Peters <tim.peters@gmail.com>
parents:
19186
diff
changeset
|
440 plat = sys.platform |
|
19186
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
441 if e.isvalid(): |
|
30929
54ff68e973ee
* Migrate set() and frozenset() from the sandbox.
Raymond Hettinger <python@rcn.com>
parents:
30686
diff
changeset
|
442 surprise = set(skipped) - e.getexpected() - set(resource_denieds) |
|
19186
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
443 if surprise: |
|
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
444 print count(len(surprise), "skip"), \ |
|
19193
095c89a825a9
Make the output of tests skipped readable (i.e., deliberately break it
Tim Peters <tim.peters@gmail.com>
parents:
19189
diff
changeset
|
445 "unexpected on", plat + ":" |
|
095c89a825a9
Make the output of tests skipped readable (i.e., deliberately break it
Tim Peters <tim.peters@gmail.com>
parents:
19189
diff
changeset
|
446 printlist(surprise) |
|
19186
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
447 else: |
|
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
448 print "Those skips are all expected on", plat + "." |
|
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
449 else: |
|
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
450 print "Ask someone to teach regrtest.py about which tests are" |
|
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
451 print "expected to get skipped on", plat + "." |
|
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
452 |
|
36933
ebeba7353894
Add regrtest -w option.
Martin v. Löwis <martin@v.loewis.de>
parents:
36719
diff
changeset
|
453 if verbose2 and bad: |
|
ebeba7353894
Add regrtest -w option.
Martin v. Löwis <martin@v.loewis.de>
parents:
36719
diff
changeset
|
454 print "Re-running failed tests in verbose mode" |
|
ebeba7353894
Add regrtest -w option.
Martin v. Löwis <martin@v.loewis.de>
parents:
36719
diff
changeset
|
455 for test in bad: |
|
36936
e256b5302b55
When the new -w option (yay! great idea) reruns a
Tim Peters <tim.peters@gmail.com>
parents:
36933
diff
changeset
|
456 print "Re-running test %r in verbose mode" % test |
|
e256b5302b55
When the new -w option (yay! great idea) reruns a
Tim Peters <tim.peters@gmail.com>
parents:
36933
diff
changeset
|
457 sys.stdout.flush() |
|
36933
ebeba7353894
Add regrtest -w option.
Martin v. Löwis <martin@v.loewis.de>
parents:
36719
diff
changeset
|
458 try: |
|
45863
ea91914bcb97
Get regrtest working when re-running tests
Neal Norwitz <nnorwitz@gmail.com>
parents:
45840
diff
changeset
|
459 test_support.verbose = True |
|
46192
6e02ff0bd6f8
Now that Lib/test/output is gone, tests should not print anything,
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46144
diff
changeset
|
460 ok = runtest(test, True, quiet, test_times, testdir, |
|
36933
ebeba7353894
Add regrtest -w option.
Martin v. Löwis <martin@v.loewis.de>
parents:
36719
diff
changeset
|
461 huntrleaks) |
|
ebeba7353894
Add regrtest -w option.
Martin v. Löwis <martin@v.loewis.de>
parents:
36719
diff
changeset
|
462 except KeyboardInterrupt: |
|
ebeba7353894
Add regrtest -w option.
Martin v. Löwis <martin@v.loewis.de>
parents:
36719
diff
changeset
|
463 # print a newline separate from the ^C |
|
ebeba7353894
Add regrtest -w option.
Martin v. Löwis <martin@v.loewis.de>
parents:
36719
diff
changeset
|
464 print |
|
ebeba7353894
Add regrtest -w option.
Martin v. Löwis <martin@v.loewis.de>
parents:
36719
diff
changeset
|
465 break |
|
ebeba7353894
Add regrtest -w option.
Martin v. Löwis <martin@v.loewis.de>
parents:
36719
diff
changeset
|
466 except: |
|
ebeba7353894
Add regrtest -w option.
Martin v. Löwis <martin@v.loewis.de>
parents:
36719
diff
changeset
|
467 raise |
|
ebeba7353894
Add regrtest -w option.
Martin v. Löwis <martin@v.loewis.de>
parents:
36719
diff
changeset
|
468 |
|
9997
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
469 if single: |
|
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
470 alltests = findtests(testdir, stdtests, nottests) |
|
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
471 for i in range(len(alltests)): |
|
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
472 if tests[0] == alltests[i]: |
|
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
473 if i == len(alltests) - 1: |
|
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
474 os.unlink(filename) |
|
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
475 else: |
|
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
476 fp = open(filename, 'w') |
|
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
477 fp.write(alltests[i+1] + '\n') |
|
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
478 fp.close() |
|
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
479 break |
|
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
480 else: |
|
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
481 os.unlink(filename) |
|
8c6e705b6b97
Added a -s option which is useful for narrowing down memory leaks.
Barry Warsaw <barry@python.org>
parents:
9038
diff
changeset
|
482 |
|
31475
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
483 if trace: |
|
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
484 r = tracer.results() |
|
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
485 r.write_results(show_missing=True, summary=True, coverdir=coverdir) |
|
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
486 |
|
32273
95287cddbc1e
add -L flag to cause leaks(1) command to run just before exit
Skip Montanaro <skip@pobox.com>
parents:
31475
diff
changeset
|
487 if runleaks: |
|
95287cddbc1e
add -L flag to cause leaks(1) command to run just before exit
Skip Montanaro <skip@pobox.com>
parents:
31475
diff
changeset
|
488 os.system("leaks %d" % os.getpid()) |
|
95287cddbc1e
add -L flag to cause leaks(1) command to run just before exit
Skip Montanaro <skip@pobox.com>
parents:
31475
diff
changeset
|
489 |
|
29978
27395c844e23
Restored commented-out line checked in by mistake.
Tim Peters <tim.peters@gmail.com>
parents:
29977
diff
changeset
|
490 sys.exit(len(bad) > 0) |
|
19417
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
491 |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
492 |
|
8803
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
493 STDTESTS = [ |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
494 'test_grammar', |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
495 'test_opcodes', |
|
41127
7100c59182ff
Patch #1678088: convert test_operations to use unittest, fold the result into test_dict.
Collin Winter <collinw@gmail.com>
parents:
41075
diff
changeset
|
496 'test_dict', |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
497 'test_builtin', |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
498 'test_exceptions', |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
499 'test_types', |
|
41075
0bb969f15118
Backported r54226 from p3yk: Move test_unittest, test_doctest and test_doctest2 higher up in the testing order.
Collin Winter <collinw@gmail.com>
parents:
39455
diff
changeset
|
500 'test_unittest', |
|
0bb969f15118
Backported r54226 from p3yk: Move test_unittest, test_doctest and test_doctest2 higher up in the testing order.
Collin Winter <collinw@gmail.com>
parents:
39455
diff
changeset
|
501 'test_doctest', |
|
0bb969f15118
Backported r54226 from p3yk: Move test_unittest, test_doctest and test_doctest2 higher up in the testing order.
Collin Winter <collinw@gmail.com>
parents:
39455
diff
changeset
|
502 'test_doctest2', |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
503 ] |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
504 |
|
8803
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
505 NOTTESTS = [ |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
506 'test_support', |
|
16839
e1b1e68cbd8c
Add regression test for future statements. This adds eight files, but
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
16755
diff
changeset
|
507 'test_future1', |
|
e1b1e68cbd8c
Add regression test for future statements. This adds eight files, but
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
16755
diff
changeset
|
508 'test_future2', |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
509 ] |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
510 |
|
8803
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
511 def findtests(testdir=None, stdtests=STDTESTS, nottests=NOTTESTS): |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
512 """Return a list of all applicable test modules.""" |
|
8803
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
513 if not testdir: testdir = findtestdir() |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
514 names = os.listdir(testdir) |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
515 tests = [] |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
516 for name in names: |
|
20654
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
517 if name[:5] == "test_" and name[-3:] == os.extsep+"py": |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
518 modname = name[:-3] |
|
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
519 if modname not in stdtests and modname not in nottests: |
|
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
520 tests.append(modname) |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
521 tests.sort() |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
522 return stdtests + tests |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
523 |
|
46192
6e02ff0bd6f8
Now that Lib/test/output is gone, tests should not print anything,
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46144
diff
changeset
|
524 def runtest(test, verbose, quiet, test_times, |
|
45840
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
525 testdir=None, huntrleaks=False): |
|
8803
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
526 """Run a single test. |
|
38699
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
527 |
|
8803
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
528 test -- the name of the test |
|
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
529 verbose -- if true, print more messages |
|
13924
ddf302d69211
Add largefile support for Linux64 and WIn64. Add test_largefile and some minor
Trent Mick <trentm@activestate.com>
parents:
13856
diff
changeset
|
530 quiet -- if true, don't print 'skipped' messages (probably redundant) |
|
45840
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
531 test_times -- a list of (time, test_name) pairs |
|
8803
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
532 testdir -- test directory |
|
38699
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
533 huntrleaks -- run multiple times to test for leaks; requires a debug |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
534 build; a triple corresponding to -R's three arguments |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
535 Return: |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
536 -2 test skipped because resource denied |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
537 -1 test skipped for some other reason |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
538 0 test failed |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
539 1 test passed |
|
8803
4d18ebd4cf42
Generalized so it's useful for testing other packages, by Andrew
Guido van Rossum <guido@python.org>
parents:
8117
diff
changeset
|
540 """ |
|
38597
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
541 |
|
38699
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
542 try: |
|
46192
6e02ff0bd6f8
Now that Lib/test/output is gone, tests should not print anything,
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46144
diff
changeset
|
543 return runtest_inner(test, verbose, quiet, test_times, |
|
45840
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
544 testdir, huntrleaks) |
|
38699
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
545 finally: |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
546 cleanup_test_droppings(test, verbose) |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
547 |
|
46192
6e02ff0bd6f8
Now that Lib/test/output is gone, tests should not print anything,
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46144
diff
changeset
|
548 def runtest_inner(test, verbose, quiet, test_times, |
|
45840
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
549 testdir=None, huntrleaks=False): |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
550 test_support.unload(test) |
|
31475
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
551 if not testdir: |
|
308c193f51e3
Patch #868499, adds -T option for code coverage. The implementation is a
Barry Warsaw <barry@python.org>
parents:
31386
diff
changeset
|
552 testdir = findtestdir() |
|
20158
2c8a5a172f47
regrtest's -g option stopped working, during the changes to improve
Tim Peters <tim.peters@gmail.com>
parents:
20091
diff
changeset
|
553 if verbose: |
|
46192
6e02ff0bd6f8
Now that Lib/test/output is gone, tests should not print anything,
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46144
diff
changeset
|
554 capture_stdout = None |
|
20022
109def4a5f6e
Change the way unexpected output is reported: rather than stopping at
Guido van Rossum <guido@python.org>
parents:
19969
diff
changeset
|
555 else: |
|
46192
6e02ff0bd6f8
Now that Lib/test/output is gone, tests should not print anything,
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46144
diff
changeset
|
556 capture_stdout = cStringIO.StringIO() |
|
38597
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
557 |
|
54088
b600e5103c63
Issue 6024: make regrtest.py promote refleaks to test failures.
Collin Winter <collinw@gmail.com>
parents:
53625
diff
changeset
|
558 refleak = False # True if the test leaked references. |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
559 try: |
|
20088
386fb26e0874
Get rid of the increasingly convoluted global tricks w/ sys.stdout, in
Tim Peters <tim.peters@gmail.com>
parents:
20035
diff
changeset
|
560 save_stdout = sys.stdout |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
561 try: |
|
46192
6e02ff0bd6f8
Now that Lib/test/output is gone, tests should not print anything,
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46144
diff
changeset
|
562 if capture_stdout: |
|
6e02ff0bd6f8
Now that Lib/test/output is gone, tests should not print anything,
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46144
diff
changeset
|
563 sys.stdout = capture_stdout |
|
24442
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
24364
diff
changeset
|
564 if test.startswith('test.'): |
|
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
24364
diff
changeset
|
565 abstest = test |
|
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
24364
diff
changeset
|
566 else: |
|
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
24364
diff
changeset
|
567 # Always import it from the test package |
|
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
24364
diff
changeset
|
568 abstest = 'test.' + test |
|
45840
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
569 start_time = time.time() |
|
24442
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
24364
diff
changeset
|
570 the_package = __import__(abstest, globals(), locals(), []) |
|
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
24364
diff
changeset
|
571 the_module = getattr(the_package, test) |
|
43808
c1f8831155de
Correct a comment about testing methods - nowadays most
Georg Brandl <georg@python.org>
parents:
43703
diff
changeset
|
572 # Old tests run to completion simply as a side-effect of |
|
c1f8831155de
Correct a comment about testing methods - nowadays most
Georg Brandl <georg@python.org>
parents:
43703
diff
changeset
|
573 # being imported. For tests based on unittest or doctest, |
|
c1f8831155de
Correct a comment about testing methods - nowadays most
Georg Brandl <georg@python.org>
parents:
43703
diff
changeset
|
574 # explicitly invoke their test_main() function (if it exists). |
|
17913
46909f22170c
Implementing an idea from Guido on the checkins list:
Tim Peters <tim.peters@gmail.com>
parents:
17891
diff
changeset
|
575 indirect_test = getattr(the_module, "test_main", None) |
|
46909f22170c
Implementing an idea from Guido on the checkins list:
Tim Peters <tim.peters@gmail.com>
parents:
17891
diff
changeset
|
576 if indirect_test is not None: |
|
46909f22170c
Implementing an idea from Guido on the checkins list:
Tim Peters <tim.peters@gmail.com>
parents:
17891
diff
changeset
|
577 indirect_test() |
|
32924
936712b31bed
Check in my refleak hunting code.
Michael W. Hudson <mwh@python.net>
parents:
32815
diff
changeset
|
578 if huntrleaks: |
|
54088
b600e5103c63
Issue 6024: make regrtest.py promote refleaks to test failures.
Collin Winter <collinw@gmail.com>
parents:
53625
diff
changeset
|
579 refleak = dash_R(the_module, test, indirect_test, huntrleaks) |
|
45840
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
580 test_time = time.time() - start_time |
|
d4bbf9b4710f
Add a -S/--slow flag to regrtest to have it print the 10 slowest tests with
Jeffrey Yasskin <jyasskin@gmail.com>
parents:
45825
diff
changeset
|
581 test_times.append((test_time, test)) |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
582 finally: |
|
20088
386fb26e0874
Get rid of the increasingly convoluted global tricks w/ sys.stdout, in
Tim Peters <tim.peters@gmail.com>
parents:
20035
diff
changeset
|
583 sys.stdout = save_stdout |
|
27636
974f196abb87
test_support.requires(): Instead of raising TestSkipped, raise a new
Fred Drake <fdrake@acm.org>
parents:
27629
diff
changeset
|
584 except test_support.ResourceDenied, msg: |
|
974f196abb87
test_support.requires(): Instead of raising TestSkipped, raise a new
Fred Drake <fdrake@acm.org>
parents:
27629
diff
changeset
|
585 if not quiet: |
|
974f196abb87
test_support.requires(): Instead of raising TestSkipped, raise a new
Fred Drake <fdrake@acm.org>
parents:
27629
diff
changeset
|
586 print test, "skipped --", msg |
|
974f196abb87
test_support.requires(): Instead of raising TestSkipped, raise a new
Fred Drake <fdrake@acm.org>
parents:
27629
diff
changeset
|
587 sys.stdout.flush() |
|
974f196abb87
test_support.requires(): Instead of raising TestSkipped, raise a new
Fred Drake <fdrake@acm.org>
parents:
27629
diff
changeset
|
588 return -2 |
|
52574
b2adb7ebdb54
Remove the regrtest check that turns any ImportError into a skipped test.
R. David Murray <rdmurray@bitdance.com>
parents:
52468
diff
changeset
|
589 except unittest.SkipTest, msg: |
|
13924
ddf302d69211
Add largefile support for Linux64 and WIn64. Add test_largefile and some minor
Trent Mick <trentm@activestate.com>
parents:
13856
diff
changeset
|
590 if not quiet: |
|
25825
cebee2a9e3cf
Remove spurious cruft from the output.
Fred Drake <fdrake@acm.org>
parents:
25674
diff
changeset
|
591 print test, "skipped --", msg |
|
25252
29559e21cd53
Add a bunch of sys.stdout.flush() calls that will hopefully improve
Guido van Rossum <guido@python.org>
parents:
25001
diff
changeset
|
592 sys.stdout.flush() |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
593 return -1 |
|
14064
c7fe7569e4e1
When a KeyboardInterrupt is caught, just use the "raise" syntax to
Fred Drake <fdrake@acm.org>
parents:
13924
diff
changeset
|
594 except KeyboardInterrupt: |
|
c7fe7569e4e1
When a KeyboardInterrupt is caught, just use the "raise" syntax to
Fred Drake <fdrake@acm.org>
parents:
13924
diff
changeset
|
595 raise |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
596 except test_support.TestFailed, msg: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
597 print "test", test, "failed --", msg |
|
25252
29559e21cd53
Add a bunch of sys.stdout.flush() calls that will hopefully improve
Guido van Rossum <guido@python.org>
parents:
25001
diff
changeset
|
598 sys.stdout.flush() |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
599 return 0 |
|
5800
7e8ed9650fcc
Catch all exceptions in test modules.
Guido van Rossum <guido@python.org>
parents:
5175
diff
changeset
|
600 except: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
601 type, value = sys.exc_info()[:2] |
|
14141
428729ff8824
When skipping a test, do not include a spurious space between the exception
Fred Drake <fdrake@acm.org>
parents:
14064
diff
changeset
|
602 print "test", test, "crashed --", str(type) + ":", value |
|
25252
29559e21cd53
Add a bunch of sys.stdout.flush() calls that will hopefully improve
Guido van Rossum <guido@python.org>
parents:
25001
diff
changeset
|
603 sys.stdout.flush() |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
604 if verbose: |
|
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
605 traceback.print_exc(file=sys.stdout) |
|
25252
29559e21cd53
Add a bunch of sys.stdout.flush() calls that will hopefully improve
Guido van Rossum <guido@python.org>
parents:
25001
diff
changeset
|
606 sys.stdout.flush() |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
607 return 0 |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
608 else: |
|
54088
b600e5103c63
Issue 6024: make regrtest.py promote refleaks to test failures.
Collin Winter <collinw@gmail.com>
parents:
53625
diff
changeset
|
609 if refleak: |
|
b600e5103c63
Issue 6024: make regrtest.py promote refleaks to test failures.
Collin Winter <collinw@gmail.com>
parents:
53625
diff
changeset
|
610 return 0 |
|
46192
6e02ff0bd6f8
Now that Lib/test/output is gone, tests should not print anything,
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46144
diff
changeset
|
611 # Except in verbose mode, tests should not print anything |
|
6e02ff0bd6f8
Now that Lib/test/output is gone, tests should not print anything,
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46144
diff
changeset
|
612 if verbose or huntrleaks: |
|
20022
109def4a5f6e
Change the way unexpected output is reported: rather than stopping at
Guido van Rossum <guido@python.org>
parents:
19969
diff
changeset
|
613 return 1 |
|
46192
6e02ff0bd6f8
Now that Lib/test/output is gone, tests should not print anything,
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46144
diff
changeset
|
614 output = capture_stdout.getvalue() |
|
6e02ff0bd6f8
Now that Lib/test/output is gone, tests should not print anything,
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46144
diff
changeset
|
615 if not output: |
|
20022
109def4a5f6e
Change the way unexpected output is reported: rather than stopping at
Guido van Rossum <guido@python.org>
parents:
19969
diff
changeset
|
616 return 1 |
|
109def4a5f6e
Change the way unexpected output is reported: rather than stopping at
Guido van Rossum <guido@python.org>
parents:
19969
diff
changeset
|
617 print "test", test, "produced unexpected output:" |
|
46192
6e02ff0bd6f8
Now that Lib/test/output is gone, tests should not print anything,
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46144
diff
changeset
|
618 print "*" * 70 |
|
6e02ff0bd6f8
Now that Lib/test/output is gone, tests should not print anything,
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46144
diff
changeset
|
619 print output |
|
6e02ff0bd6f8
Now that Lib/test/output is gone, tests should not print anything,
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46144
diff
changeset
|
620 print "*" * 70 |
|
25252
29559e21cd53
Add a bunch of sys.stdout.flush() calls that will hopefully improve
Guido van Rossum <guido@python.org>
parents:
25001
diff
changeset
|
621 sys.stdout.flush() |
|
20022
109def4a5f6e
Change the way unexpected output is reported: rather than stopping at
Guido van Rossum <guido@python.org>
parents:
19969
diff
changeset
|
622 return 0 |
|
109def4a5f6e
Change the way unexpected output is reported: rather than stopping at
Guido van Rossum <guido@python.org>
parents:
19969
diff
changeset
|
623 |
|
38699
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
624 def cleanup_test_droppings(testname, verbose): |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
625 import shutil |
|
53625
94cdfd07d4f4
make sure mode is removable while cleaning up test droppings
Benjamin Peterson <benjamin@python.org>
parents:
53000
diff
changeset
|
626 import stat |
|
38699
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
627 |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
628 # Try to clean up junk commonly left behind. While tests shouldn't leave |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
629 # any files or directories behind, when a test fails that can be tedious |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
630 # for it to arrange. The consequences can be especially nasty on Windows, |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
631 # since if a test leaves a file open, it cannot be deleted by name (while |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
632 # there's nothing we can do about that here either, we can display the |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
633 # name of the offending test, which is a real help). |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
634 for name in (test_support.TESTFN, |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
635 "db_home", |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
636 ): |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
637 if not os.path.exists(name): |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
638 continue |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
639 |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
640 if os.path.isdir(name): |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
641 kind, nuker = "directory", shutil.rmtree |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
642 elif os.path.isfile(name): |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
643 kind, nuker = "file", os.unlink |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
644 else: |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
645 raise SystemError("os.path says %r exists but is neither " |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
646 "directory nor file" % name) |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
647 |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
648 if verbose: |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
649 print "%r left behind %s %r" % (testname, kind, name) |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
650 try: |
|
53625
94cdfd07d4f4
make sure mode is removable while cleaning up test droppings
Benjamin Peterson <benjamin@python.org>
parents:
53000
diff
changeset
|
651 # if we have chmod, fix possible permissions problems |
|
94cdfd07d4f4
make sure mode is removable while cleaning up test droppings
Benjamin Peterson <benjamin@python.org>
parents:
53000
diff
changeset
|
652 # that might prevent cleanup |
|
94cdfd07d4f4
make sure mode is removable while cleaning up test droppings
Benjamin Peterson <benjamin@python.org>
parents:
53000
diff
changeset
|
653 if (hasattr(os, 'chmod')): |
|
94cdfd07d4f4
make sure mode is removable while cleaning up test droppings
Benjamin Peterson <benjamin@python.org>
parents:
53000
diff
changeset
|
654 os.chmod(name, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO) |
|
38699
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
655 nuker(name) |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
656 except Exception, msg: |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
657 print >> sys.stderr, ("%r left behind %s %r and it couldn't be " |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
658 "removed: %s" % (testname, kind, name, msg)) |
|
5a74193429f0
Implementing a happy idea from Georg Brandl: make runtest() try to
Tim Peters <tim.peters@gmail.com>
parents:
38683
diff
changeset
|
659 |
|
38597
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
660 def dash_R(the_module, test, indirect_test, huntrleaks): |
|
54088
b600e5103c63
Issue 6024: make regrtest.py promote refleaks to test failures.
Collin Winter <collinw@gmail.com>
parents:
53625
diff
changeset
|
661 """Run a test multiple times, looking for reference leaks. |
|
b600e5103c63
Issue 6024: make regrtest.py promote refleaks to test failures.
Collin Winter <collinw@gmail.com>
parents:
53625
diff
changeset
|
662 |
|
b600e5103c63
Issue 6024: make regrtest.py promote refleaks to test failures.
Collin Winter <collinw@gmail.com>
parents:
53625
diff
changeset
|
663 Returns: |
|
b600e5103c63
Issue 6024: make regrtest.py promote refleaks to test failures.
Collin Winter <collinw@gmail.com>
parents:
53625
diff
changeset
|
664 False if the test didn't leak references; True if we detected refleaks. |
|
b600e5103c63
Issue 6024: make regrtest.py promote refleaks to test failures.
Collin Winter <collinw@gmail.com>
parents:
53625
diff
changeset
|
665 """ |
|
38597
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
666 # This code is hackish and inelegant, but it seems to do the job. |
|
47189
f419b2e96a98
Revert copy_reg -> copyreg rename.
Georg Brandl <georg@python.org>
parents:
46865
diff
changeset
|
667 import copy_reg, _abcoll, io |
|
38597
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
668 |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
669 if not hasattr(sys, 'gettotalrefcount'): |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
670 raise Exception("Tracking reference leaks requires a debug build " |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
671 "of Python") |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
672 |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
673 # Save current values for dash_R_cleanup() to restore. |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
674 fs = warnings.filters[:] |
|
47189
f419b2e96a98
Revert copy_reg -> copyreg rename.
Georg Brandl <georg@python.org>
parents:
46865
diff
changeset
|
675 ps = copy_reg.dispatch_table.copy() |
|
38597
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
676 pic = sys.path_importer_cache.copy() |
|
43958
103b7f955036
Backport of _abccoll.py by Benjamin Arangueren, issue 1383.
Guido van Rossum <guido@python.org>
parents:
43808
diff
changeset
|
677 abcs = {} |
|
46248
5939900d98d2
Correct the apparent refleak in test_io:
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46192
diff
changeset
|
678 modules = _abcoll, io |
|
5939900d98d2
Correct the apparent refleak in test_io:
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46192
diff
changeset
|
679 for abc in [getattr(mod, a) for mod in modules for a in mod.__all__]: |
|
5939900d98d2
Correct the apparent refleak in test_io:
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46192
diff
changeset
|
680 # XXX isinstance(abc, ABCMeta) leads to infinite recursion |
|
5939900d98d2
Correct the apparent refleak in test_io:
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46192
diff
changeset
|
681 if not hasattr(abc, '_abc_registry'): |
|
44080
80b42db2eac9
Backport of -r59242:59246 from py3k
Christian Heimes <christian@cheimes.de>
parents:
43958
diff
changeset
|
682 continue |
|
43958
103b7f955036
Backport of _abccoll.py by Benjamin Arangueren, issue 1383.
Guido van Rossum <guido@python.org>
parents:
43808
diff
changeset
|
683 for obj in abc.__subclasses__() + [abc]: |
|
103b7f955036
Backport of _abccoll.py by Benjamin Arangueren, issue 1383.
Guido van Rossum <guido@python.org>
parents:
43808
diff
changeset
|
684 abcs[obj] = obj._abc_registry.copy() |
|
103b7f955036
Backport of _abccoll.py by Benjamin Arangueren, issue 1383.
Guido van Rossum <guido@python.org>
parents:
43808
diff
changeset
|
685 |
|
38597
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
686 if indirect_test: |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
687 def run_the_test(): |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
688 indirect_test() |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
689 else: |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
690 def run_the_test(): |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
691 reload(the_module) |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
692 |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
693 deltas = [] |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
694 nwarmup, ntracked, fname = huntrleaks |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
695 repcount = nwarmup + ntracked |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
696 print >> sys.stderr, "beginning", repcount, "repetitions" |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
697 print >> sys.stderr, ("1234567890"*(repcount//10 + 1))[:repcount] |
|
43958
103b7f955036
Backport of _abccoll.py by Benjamin Arangueren, issue 1383.
Guido van Rossum <guido@python.org>
parents:
43808
diff
changeset
|
698 dash_R_cleanup(fs, ps, pic, abcs) |
|
38597
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
699 for i in range(repcount): |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
700 rc = sys.gettotalrefcount() |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
701 run_the_test() |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
702 sys.stderr.write('.') |
|
43958
103b7f955036
Backport of _abccoll.py by Benjamin Arangueren, issue 1383.
Guido van Rossum <guido@python.org>
parents:
43808
diff
changeset
|
703 dash_R_cleanup(fs, ps, pic, abcs) |
|
38597
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
704 if i >= nwarmup: |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
705 deltas.append(sys.gettotalrefcount() - rc - 2) |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
706 print >> sys.stderr |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
707 if any(deltas): |
|
41686
4367b7af7531
Don't ever report a failure when the sum of the reference count differences
Neal Norwitz <nnorwitz@gmail.com>
parents:
41127
diff
changeset
|
708 msg = '%s leaked %s references, sum=%s' % (test, deltas, sum(deltas)) |
|
4367b7af7531
Don't ever report a failure when the sum of the reference count differences
Neal Norwitz <nnorwitz@gmail.com>
parents:
41127
diff
changeset
|
709 print >> sys.stderr, msg |
|
38597
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
710 refrep = open(fname, "a") |
|
41686
4367b7af7531
Don't ever report a failure when the sum of the reference count differences
Neal Norwitz <nnorwitz@gmail.com>
parents:
41127
diff
changeset
|
711 print >> refrep, msg |
|
38597
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
712 refrep.close() |
|
54088
b600e5103c63
Issue 6024: make regrtest.py promote refleaks to test failures.
Collin Winter <collinw@gmail.com>
parents:
53625
diff
changeset
|
713 return True |
|
b600e5103c63
Issue 6024: make regrtest.py promote refleaks to test failures.
Collin Winter <collinw@gmail.com>
parents:
53625
diff
changeset
|
714 return False |
|
38597
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
715 |
|
43958
103b7f955036
Backport of _abccoll.py by Benjamin Arangueren, issue 1383.
Guido van Rossum <guido@python.org>
parents:
43808
diff
changeset
|
716 def dash_R_cleanup(fs, ps, pic, abcs): |
|
47189
f419b2e96a98
Revert copy_reg -> copyreg rename.
Georg Brandl <georg@python.org>
parents:
46865
diff
changeset
|
717 import gc, copy_reg |
|
46838
33d4e03b23ba
Deprecate the dircache module for 3.0.
Brett Cannon <bcannon@gmail.com>
parents:
46675
diff
changeset
|
718 import _strptime, linecache |
|
33d4e03b23ba
Deprecate the dircache module for 3.0.
Brett Cannon <bcannon@gmail.com>
parents:
46675
diff
changeset
|
719 dircache = test_support.import_module('dircache', deprecated=True) |
|
38597
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
720 import urlparse, urllib, urllib2, mimetypes, doctest |
|
46248
5939900d98d2
Correct the apparent refleak in test_io:
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46192
diff
changeset
|
721 import struct, filecmp |
|
38597
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
722 from distutils.dir_util import _path_created |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
723 |
|
46474
5c43159f5ad0
Some tests did not pass on repeated calls (regrtest -R::)
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46248
diff
changeset
|
724 # Clear the warnings registry, so they can be displayed again |
|
5c43159f5ad0
Some tests did not pass on repeated calls (regrtest -R::)
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46248
diff
changeset
|
725 for mod in sys.modules.values(): |
|
5c43159f5ad0
Some tests did not pass on repeated calls (regrtest -R::)
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46248
diff
changeset
|
726 if hasattr(mod, '__warningregistry__'): |
|
5c43159f5ad0
Some tests did not pass on repeated calls (regrtest -R::)
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46248
diff
changeset
|
727 del mod.__warningregistry__ |
|
5c43159f5ad0
Some tests did not pass on repeated calls (regrtest -R::)
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46248
diff
changeset
|
728 |
|
38597
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
729 # Restore some original values. |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
730 warnings.filters[:] = fs |
|
47189
f419b2e96a98
Revert copy_reg -> copyreg rename.
Georg Brandl <georg@python.org>
parents:
46865
diff
changeset
|
731 copy_reg.dispatch_table.clear() |
|
f419b2e96a98
Revert copy_reg -> copyreg rename.
Georg Brandl <georg@python.org>
parents:
46865
diff
changeset
|
732 copy_reg.dispatch_table.update(ps) |
|
38597
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
733 sys.path_importer_cache.clear() |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
734 sys.path_importer_cache.update(pic) |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
735 |
|
45025
ea3fe302d392
Added clear cache methods to clear the internal type lookup cache for ref leak test runs.
Christian Heimes <christian@cheimes.de>
parents:
44459
diff
changeset
|
736 # clear type cache |
| 45143 | 737 sys._clear_type_cache() |
|
45025
ea3fe302d392
Added clear cache methods to clear the internal type lookup cache for ref leak test runs.
Christian Heimes <christian@cheimes.de>
parents:
44459
diff
changeset
|
738 |
|
43958
103b7f955036
Backport of _abccoll.py by Benjamin Arangueren, issue 1383.
Guido van Rossum <guido@python.org>
parents:
43808
diff
changeset
|
739 # Clear ABC registries, restoring previously saved ABC registries. |
|
46248
5939900d98d2
Correct the apparent refleak in test_io:
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46192
diff
changeset
|
740 for abc, registry in abcs.items(): |
|
5939900d98d2
Correct the apparent refleak in test_io:
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46192
diff
changeset
|
741 abc._abc_registry = registry.copy() |
|
5939900d98d2
Correct the apparent refleak in test_io:
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46192
diff
changeset
|
742 abc._abc_cache.clear() |
|
5939900d98d2
Correct the apparent refleak in test_io:
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
46192
diff
changeset
|
743 abc._abc_negative_cache.clear() |
|
43958
103b7f955036
Backport of _abccoll.py by Benjamin Arangueren, issue 1383.
Guido van Rossum <guido@python.org>
parents:
43808
diff
changeset
|
744 |
|
38597
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
745 # Clear assorted module caches. |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
746 _path_created.clear() |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
747 re.purge() |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
748 _strptime._regex_cache.clear() |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
749 urlparse.clear_cache() |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
750 urllib.urlcleanup() |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
751 urllib2.install_opener(None) |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
752 dircache.reset() |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
753 linecache.clearcache() |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
754 mimetypes._default_mime_types() |
|
38637
3a36d5f5b10f
dash_R_cleanup(): Clear filecmp._cache. This accounts for
Tim Peters <tim.peters@gmail.com>
parents:
38597
diff
changeset
|
755 filecmp._cache.clear() |
|
44459
7643a43f25a1
Added _struct._clearcache() for regression tests
Christian Heimes <christian@cheimes.de>
parents:
44458
diff
changeset
|
756 struct._clearcache() |
|
38597
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
757 doctest.master = None |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
758 |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
759 # Collect cyclic trash. |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
760 gc.collect() |
|
c05ef08e1ba9
"Flat is better than nested."
Tim Peters <tim.peters@gmail.com>
parents:
38472
diff
changeset
|
761 |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
762 def findtestdir(): |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
763 if __name__ == '__main__': |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
764 file = sys.argv[0] |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
765 else: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
766 file = __file__ |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
767 testdir = os.path.dirname(file) or os.curdir |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
768 return testdir |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
769 |
| 23643 | 770 def removepy(name): |
| 771 if name.endswith(os.extsep + "py"): | |
| 772 name = name[:-3] | |
| 773 return name | |
| 774 | |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
775 def count(n, word): |
|
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
776 if n == 1: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
777 return "%d %s" % (n, word) |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
778 else: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
6505
diff
changeset
|
779 return "%d %ss" % (n, word) |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
780 |
|
19193
095c89a825a9
Make the output of tests skipped readable (i.e., deliberately break it
Tim Peters <tim.peters@gmail.com>
parents:
19189
diff
changeset
|
781 def printlist(x, width=70, indent=4): |
|
25001
fcb5201c69ed
Got rid of the toy _Set class, in favor of sets.Set.
Tim Peters <tim.peters@gmail.com>
parents:
24829
diff
changeset
|
782 """Print the elements of iterable x to stdout. |
|
19193
095c89a825a9
Make the output of tests skipped readable (i.e., deliberately break it
Tim Peters <tim.peters@gmail.com>
parents:
19189
diff
changeset
|
783 |
|
095c89a825a9
Make the output of tests skipped readable (i.e., deliberately break it
Tim Peters <tim.peters@gmail.com>
parents:
19189
diff
changeset
|
784 Optional arg width (default 70) is the maximum line length. |
|
095c89a825a9
Make the output of tests skipped readable (i.e., deliberately break it
Tim Peters <tim.peters@gmail.com>
parents:
19189
diff
changeset
|
785 Optional arg indent (default 4) is the number of blanks with which to |
|
095c89a825a9
Make the output of tests skipped readable (i.e., deliberately break it
Tim Peters <tim.peters@gmail.com>
parents:
19189
diff
changeset
|
786 begin each line. |
|
095c89a825a9
Make the output of tests skipped readable (i.e., deliberately break it
Tim Peters <tim.peters@gmail.com>
parents:
19189
diff
changeset
|
787 """ |
|
095c89a825a9
Make the output of tests skipped readable (i.e., deliberately break it
Tim Peters <tim.peters@gmail.com>
parents:
19189
diff
changeset
|
788 |
|
24113
f35e29aa0d92
printlist(): Replaced the guts with a call to textwrap. Yay!
Tim Peters <tim.peters@gmail.com>
parents:
23777
diff
changeset
|
789 from textwrap import fill |
|
f35e29aa0d92
printlist(): Replaced the guts with a call to textwrap. Yay!
Tim Peters <tim.peters@gmail.com>
parents:
23777
diff
changeset
|
790 blanks = ' ' * indent |
|
f35e29aa0d92
printlist(): Replaced the guts with a call to textwrap. Yay!
Tim Peters <tim.peters@gmail.com>
parents:
23777
diff
changeset
|
791 print fill(' '.join(map(str, x)), width, |
|
f35e29aa0d92
printlist(): Replaced the guts with a call to textwrap. Yay!
Tim Peters <tim.peters@gmail.com>
parents:
23777
diff
changeset
|
792 initial_indent=blanks, subsequent_indent=blanks) |
|
19193
095c89a825a9
Make the output of tests skipped readable (i.e., deliberately break it
Tim Peters <tim.peters@gmail.com>
parents:
19189
diff
changeset
|
793 |
|
22723
1e3062e69f2c
We expect to skip the new test_mpz on Windows.
Tim Peters <tim.peters@gmail.com>
parents:
22287
diff
changeset
|
794 # Map sys.platform to a string containing the basenames of tests |
|
1e3062e69f2c
We expect to skip the new test_mpz on Windows.
Tim Peters <tim.peters@gmail.com>
parents:
22287
diff
changeset
|
795 # expected to be skipped on that platform. |
|
25674
62853195be68
Logic for determining whether skipping test_pep277 is expected: whether
Tim Peters <tim.peters@gmail.com>
parents:
25617
diff
changeset
|
796 # |
|
62853195be68
Logic for determining whether skipping test_pep277 is expected: whether
Tim Peters <tim.peters@gmail.com>
parents:
25617
diff
changeset
|
797 # Special cases: |
|
62853195be68
Logic for determining whether skipping test_pep277 is expected: whether
Tim Peters <tim.peters@gmail.com>
parents:
25617
diff
changeset
|
798 # test_pep277 |
|
62853195be68
Logic for determining whether skipping test_pep277 is expected: whether
Tim Peters <tim.peters@gmail.com>
parents:
25617
diff
changeset
|
799 # The _ExpectedSkips constructor adds this to the set of expected |
|
62853195be68
Logic for determining whether skipping test_pep277 is expected: whether
Tim Peters <tim.peters@gmail.com>
parents:
25617
diff
changeset
|
800 # skips if not os.path.supports_unicode_filenames. |
|
28112
2c8c2c6b2ab7
Fix SF bugs #692951 and 692988, test_timeout.py needs 'network' resource
Neal Norwitz <nnorwitz@gmail.com>
parents:
28081
diff
changeset
|
801 # test_timeout |
|
2c8c2c6b2ab7
Fix SF bugs #692951 and 692988, test_timeout.py needs 'network' resource
Neal Norwitz <nnorwitz@gmail.com>
parents:
28081
diff
changeset
|
802 # Controlled by test_timeout.skip_expected. Requires the network |
|
2c8c2c6b2ab7
Fix SF bugs #692951 and 692988, test_timeout.py needs 'network' resource
Neal Norwitz <nnorwitz@gmail.com>
parents:
28081
diff
changeset
|
803 # resource and a socket module. |
|
42221
2c33df09c1c7
Patch #1731169: clean up expected skips list.
Georg Brandl <georg@python.org>
parents:
41793
diff
changeset
|
804 # |
|
2c33df09c1c7
Patch #1731169: clean up expected skips list.
Georg Brandl <georg@python.org>
parents:
41793
diff
changeset
|
805 # Tests that are expected to be skipped everywhere except on one platform |
|
2c33df09c1c7
Patch #1731169: clean up expected skips list.
Georg Brandl <georg@python.org>
parents:
41793
diff
changeset
|
806 # are also handled separately. |
|
22723
1e3062e69f2c
We expect to skip the new test_mpz on Windows.
Tim Peters <tim.peters@gmail.com>
parents:
22287
diff
changeset
|
807 |
|
19189
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
808 _expectations = { |
|
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
809 'win32': |
|
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
810 """ |
|
30472
084408fee961
test__locale (two underscores) can't pass on Windows: RADIXCHAR doesn't
Tim Peters <tim.peters@gmail.com>
parents:
29978
diff
changeset
|
811 test__locale |
|
28993
f1fcac4cabad
the new bsddb185 module is an expected skip on most platforms (this may not
Skip Montanaro <skip@pobox.com>
parents:
28798
diff
changeset
|
812 test_bsddb185 |
|
26354
35f125d52cf5
Move Windows Python away from bsddb 1.85 and toward Sleepycat's latest.
Tim Peters <tim.peters@gmail.com>
parents:
26288
diff
changeset
|
813 test_bsddb3 |
|
19189
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
814 test_commands |
|
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
815 test_crypt |
|
20622
aa5647569ee2
Record that test_curses doesn't run on win32.
Tim Peters <tim.peters@gmail.com>
parents:
20610
diff
changeset
|
816 test_curses |
|
19189
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
817 test_dbm |
|
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
818 test_dl |
|
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
819 test_fcntl |
|
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
820 test_fork1 |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
821 test_epoll |
|
19189
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
822 test_gdbm |
|
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
823 test_grp |
|
28157
8a71301afc2d
test_ioctl is an expected skip on Windows.
Tim Peters <tim.peters@gmail.com>
parents:
28112
diff
changeset
|
824 test_ioctl |
|
19189
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
825 test_largefile |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
826 test_kqueue |
|
19189
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
827 test_mhlib |
|
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
828 test_openpty |
|
26587
81032e97ba3c
Added test_ossaudiodev to expected skips on Windows.
Tim Peters <tim.peters@gmail.com>
parents:
26539
diff
changeset
|
829 test_ossaudiodev |
|
43042
8b0b1146d908
Patch #1680959: add test suite for pipes module.
Georg Brandl <georg@python.org>
parents:
42221
diff
changeset
|
830 test_pipes |
|
19189
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
831 test_poll |
|
27922
efc465810e1e
test_posix is an expected skip on Win32. Also fixed test_posix to
Tim Peters <tim.peters@gmail.com>
parents:
27896
diff
changeset
|
832 test_posix |
|
19189
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
833 test_pty |
|
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
834 test_pwd |
|
23264
b572f7a0bb56
test_resource has no chance of running on Windows.
Tim Peters <tim.peters@gmail.com>
parents:
23202
diff
changeset
|
835 test_resource |
|
19189
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
836 test_signal |
|
32948
953ce5af10a3
test_threadsignals is an expected skip on win32.
Tim Peters <tim.peters@gmail.com>
parents:
32924
diff
changeset
|
837 test_threadsignals |
|
19189
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
838 test_timing |
|
37135
7dadd3fc5efa
Record that test_wait[34] get skipped on native Windows.
Tim Peters <tim.peters@gmail.com>
parents:
37017
diff
changeset
|
839 test_wait3 |
|
7dadd3fc5efa
Record that test_wait[34] get skipped on native Windows.
Tim Peters <tim.peters@gmail.com>
parents:
37017
diff
changeset
|
840 test_wait4 |
|
19189
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
841 """, |
|
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
842 'linux2': |
|
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
843 """ |
|
28993
f1fcac4cabad
the new bsddb185 module is an expected skip on most platforms (this may not
Skip Montanaro <skip@pobox.com>
parents:
28798
diff
changeset
|
844 test_bsddb185 |
|
20630
e496b85229c7
test_curses is an expected skip on Linux too.
Guido van Rossum <guido@python.org>
parents:
20622
diff
changeset
|
845 test_curses |
|
19189
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
846 test_dl |
|
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
847 test_largefile |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
848 test_kqueue |
|
27896
4e31e4086849
- The audio driver tests (test_ossaudiodev.py and
Guido van Rossum <guido@python.org>
parents:
27865
diff
changeset
|
849 test_ossaudiodev |
|
19189
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
850 """, |
|
19528
96a0bb3a8521
Added list of tests expected to be skipped on the mac.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19417
diff
changeset
|
851 'mac': |
|
19651
b39e56dfe35d
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum <guido@python.org>
parents:
19528
diff
changeset
|
852 """ |
|
27163
734ebd47bc2a
Updated the list of expected skips for MacPython-OS9.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26938
diff
changeset
|
853 test_atexit |
|
19651
b39e56dfe35d
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum <guido@python.org>
parents:
19528
diff
changeset
|
854 test_bsddb |
|
28993
f1fcac4cabad
the new bsddb185 module is an expected skip on most platforms (this may not
Skip Montanaro <skip@pobox.com>
parents:
28798
diff
changeset
|
855 test_bsddb185 |
|
27163
734ebd47bc2a
Updated the list of expected skips for MacPython-OS9.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26938
diff
changeset
|
856 test_bsddb3 |
|
734ebd47bc2a
Updated the list of expected skips for MacPython-OS9.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26938
diff
changeset
|
857 test_bz2 |
|
19651
b39e56dfe35d
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum <guido@python.org>
parents:
19528
diff
changeset
|
858 test_commands |
|
b39e56dfe35d
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum <guido@python.org>
parents:
19528
diff
changeset
|
859 test_crypt |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20765
diff
changeset
|
860 test_curses |
|
19651
b39e56dfe35d
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum <guido@python.org>
parents:
19528
diff
changeset
|
861 test_dbm |
|
b39e56dfe35d
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum <guido@python.org>
parents:
19528
diff
changeset
|
862 test_dl |
|
b39e56dfe35d
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum <guido@python.org>
parents:
19528
diff
changeset
|
863 test_fcntl |
|
b39e56dfe35d
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum <guido@python.org>
parents:
19528
diff
changeset
|
864 test_fork1 |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
865 test_epoll |
|
19651
b39e56dfe35d
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum <guido@python.org>
parents:
19528
diff
changeset
|
866 test_grp |
|
28225
27addea33e0c
Test_ioctl and test_tarfile are skipped on MacOS9.
Jack Jansen <jack.jansen@cwi.nl>
parents:
28157
diff
changeset
|
867 test_ioctl |
|
19651
b39e56dfe35d
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum <guido@python.org>
parents:
19528
diff
changeset
|
868 test_largefile |
|
b39e56dfe35d
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum <guido@python.org>
parents:
19528
diff
changeset
|
869 test_locale |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
870 test_kqueue |
|
19651
b39e56dfe35d
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum <guido@python.org>
parents:
19528
diff
changeset
|
871 test_mmap |
|
b39e56dfe35d
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum <guido@python.org>
parents:
19528
diff
changeset
|
872 test_openpty |
|
27163
734ebd47bc2a
Updated the list of expected skips for MacPython-OS9.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26938
diff
changeset
|
873 test_ossaudiodev |
|
19651
b39e56dfe35d
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum <guido@python.org>
parents:
19528
diff
changeset
|
874 test_poll |
|
27163
734ebd47bc2a
Updated the list of expected skips for MacPython-OS9.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26938
diff
changeset
|
875 test_popen |
|
19651
b39e56dfe35d
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum <guido@python.org>
parents:
19528
diff
changeset
|
876 test_popen2 |
|
28020
21a50c308db4
Checking mac-specific stuff from the 2.3a2 branch in on the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
27963
diff
changeset
|
877 test_posix |
|
19651
b39e56dfe35d
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum <guido@python.org>
parents:
19528
diff
changeset
|
878 test_pty |
|
b39e56dfe35d
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum <guido@python.org>
parents:
19528
diff
changeset
|
879 test_pwd |
|
27163
734ebd47bc2a
Updated the list of expected skips for MacPython-OS9.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26938
diff
changeset
|
880 test_resource |
|
19651
b39e56dfe35d
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum <guido@python.org>
parents:
19528
diff
changeset
|
881 test_signal |
|
b39e56dfe35d
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum <guido@python.org>
parents:
19528
diff
changeset
|
882 test_sundry |
|
28225
27addea33e0c
Test_ioctl and test_tarfile are skipped on MacOS9.
Jack Jansen <jack.jansen@cwi.nl>
parents:
28157
diff
changeset
|
883 test_tarfile |
|
19651
b39e56dfe35d
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum <guido@python.org>
parents:
19528
diff
changeset
|
884 test_timing |
|
b39e56dfe35d
Whitespace normalization (tabs -> 4 spaces) in the Mac expectations.
Guido van Rossum <guido@python.org>
parents:
19528
diff
changeset
|
885 """, |
|
25497
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
886 'unixware7': |
|
19729
deb08af89a35
Patch #453627: Adds a list of tests that are expected to be skipped for UnixWare 7.x systems.
Martin v. Löwis <martin@v.loewis.de>
parents:
19651
diff
changeset
|
887 """ |
|
deb08af89a35
Patch #453627: Adds a list of tests that are expected to be skipped for UnixWare 7.x systems.
Martin v. Löwis <martin@v.loewis.de>
parents:
19651
diff
changeset
|
888 test_bsddb |
|
28993
f1fcac4cabad
the new bsddb185 module is an expected skip on most platforms (this may not
Skip Montanaro <skip@pobox.com>
parents:
28798
diff
changeset
|
889 test_bsddb185 |
|
19729
deb08af89a35
Patch #453627: Adds a list of tests that are expected to be skipped for UnixWare 7.x systems.
Martin v. Löwis <martin@v.loewis.de>
parents:
19651
diff
changeset
|
890 test_dl |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
891 test_epoll |
|
19729
deb08af89a35
Patch #453627: Adds a list of tests that are expected to be skipped for UnixWare 7.x systems.
Martin v. Löwis <martin@v.loewis.de>
parents:
19651
diff
changeset
|
892 test_largefile |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
893 test_kqueue |
|
19729
deb08af89a35
Patch #453627: Adds a list of tests that are expected to be skipped for UnixWare 7.x systems.
Martin v. Löwis <martin@v.loewis.de>
parents:
19651
diff
changeset
|
894 test_minidom |
|
deb08af89a35
Patch #453627: Adds a list of tests that are expected to be skipped for UnixWare 7.x systems.
Martin v. Löwis <martin@v.loewis.de>
parents:
19651
diff
changeset
|
895 test_openpty |
|
deb08af89a35
Patch #453627: Adds a list of tests that are expected to be skipped for UnixWare 7.x systems.
Martin v. Löwis <martin@v.loewis.de>
parents:
19651
diff
changeset
|
896 test_pyexpat |
|
deb08af89a35
Patch #453627: Adds a list of tests that are expected to be skipped for UnixWare 7.x systems.
Martin v. Löwis <martin@v.loewis.de>
parents:
19651
diff
changeset
|
897 test_sax |
|
deb08af89a35
Patch #453627: Adds a list of tests that are expected to be skipped for UnixWare 7.x systems.
Martin v. Löwis <martin@v.loewis.de>
parents:
19651
diff
changeset
|
898 test_sundry |
|
deb08af89a35
Patch #453627: Adds a list of tests that are expected to be skipped for UnixWare 7.x systems.
Martin v. Löwis <martin@v.loewis.de>
parents:
19651
diff
changeset
|
899 """, |
|
25497
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
900 'openunix8': |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
901 """ |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
902 test_bsddb |
|
28993
f1fcac4cabad
the new bsddb185 module is an expected skip on most platforms (this may not
Skip Montanaro <skip@pobox.com>
parents:
28798
diff
changeset
|
903 test_bsddb185 |
|
25497
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
904 test_dl |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
905 test_epoll |
|
25497
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
906 test_largefile |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
907 test_kqueue |
|
25497
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
908 test_minidom |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
909 test_openpty |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
910 test_pyexpat |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
911 test_sax |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
912 test_sundry |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
913 """, |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
914 'sco_sv3': |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
915 """ |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
916 test_asynchat |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
917 test_bsddb |
|
28993
f1fcac4cabad
the new bsddb185 module is an expected skip on most platforms (this may not
Skip Montanaro <skip@pobox.com>
parents:
28798
diff
changeset
|
918 test_bsddb185 |
|
25497
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
919 test_dl |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
920 test_fork1 |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
921 test_epoll |
|
25497
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
922 test_gettext |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
923 test_largefile |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
924 test_locale |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
925 test_kqueue |
|
25497
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
926 test_minidom |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
927 test_openpty |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
928 test_pyexpat |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
929 test_queue |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
930 test_sax |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
931 test_sundry |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
932 test_thread |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
933 test_threaded_import |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
934 test_threadedtempfile |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
935 test_threading |
|
b526e12b941b
Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
25326
diff
changeset
|
936 """, |
|
20654
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
937 'riscos': |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
938 """ |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
939 test_asynchat |
|
29066
90342f395721
Patch #734231: Update RiscOS support. In particular, correct
Martin v. Löwis <martin@v.loewis.de>
parents:
28993
diff
changeset
|
940 test_atexit |
|
20654
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
941 test_bsddb |
|
28993
f1fcac4cabad
the new bsddb185 module is an expected skip on most platforms (this may not
Skip Montanaro <skip@pobox.com>
parents:
28798
diff
changeset
|
942 test_bsddb185 |
|
29066
90342f395721
Patch #734231: Update RiscOS support. In particular, correct
Martin v. Löwis <martin@v.loewis.de>
parents:
28993
diff
changeset
|
943 test_bsddb3 |
|
20654
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
944 test_commands |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
945 test_crypt |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
946 test_dbm |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
947 test_dl |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
948 test_fcntl |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
949 test_fork1 |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
950 test_epoll |
|
20654
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
951 test_gdbm |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
952 test_grp |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
953 test_largefile |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
954 test_locale |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
955 test_kqueue |
|
20654
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
956 test_mmap |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
957 test_openpty |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
958 test_poll |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
959 test_popen2 |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
960 test_pty |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
961 test_pwd |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
962 test_strop |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
963 test_sundry |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
964 test_thread |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
965 test_threaded_import |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
966 test_threadedtempfile |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
967 test_threading |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
968 test_timing |
|
edd9d0b3c47e
SF patch #474590 -- RISC OS support
Guido van Rossum <guido@python.org>
parents:
20630
diff
changeset
|
969 """, |
|
21244
1289a0559e5a
sys.platform on Mac OS X is now "darwin", without any version number appended.
Jack Jansen <jack.jansen@cwi.nl>
parents:
21140
diff
changeset
|
970 'darwin': |
|
21140
1c6c027fd110
Added tests expected to be skipped on Mac OS X.
Jack Jansen <jack.jansen@cwi.nl>
parents:
21113
diff
changeset
|
971 """ |
|
30686
0060157844d8
Add test__locale to expected skip list for Darwin.
Brett Cannon <bcannon@gmail.com>
parents:
30472
diff
changeset
|
972 test__locale |
|
26900
18d4f71f5ed6
Updated the expected skips for MacOSX.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26587
diff
changeset
|
973 test_bsddb |
|
26512
376bd357c4d5
Some more expected skips on OSX.
Guido van Rossum <guido@python.org>
parents:
26492
diff
changeset
|
974 test_bsddb3 |
|
21140
1c6c027fd110
Added tests expected to be skipped on Mac OS X.
Jack Jansen <jack.jansen@cwi.nl>
parents:
21113
diff
changeset
|
975 test_curses |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
976 test_epoll |
|
21140
1c6c027fd110
Added tests expected to be skipped on Mac OS X.
Jack Jansen <jack.jansen@cwi.nl>
parents:
21113
diff
changeset
|
977 test_gdbm |
|
1c6c027fd110
Added tests expected to be skipped on Mac OS X.
Jack Jansen <jack.jansen@cwi.nl>
parents:
21113
diff
changeset
|
978 test_largefile |
|
26900
18d4f71f5ed6
Updated the expected skips for MacOSX.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26587
diff
changeset
|
979 test_locale |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
980 test_kqueue |
|
21140
1c6c027fd110
Added tests expected to be skipped on Mac OS X.
Jack Jansen <jack.jansen@cwi.nl>
parents:
21113
diff
changeset
|
981 test_minidom |
|
26900
18d4f71f5ed6
Updated the expected skips for MacOSX.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26587
diff
changeset
|
982 test_ossaudiodev |
|
21140
1c6c027fd110
Added tests expected to be skipped on Mac OS X.
Jack Jansen <jack.jansen@cwi.nl>
parents:
21113
diff
changeset
|
983 test_poll |
|
1c6c027fd110
Added tests expected to be skipped on Mac OS X.
Jack Jansen <jack.jansen@cwi.nl>
parents:
21113
diff
changeset
|
984 """, |
|
24274
1cebce50fe71
Add a rather generous set of tests allowed to be skipped on sunos5.
Guido van Rossum <guido@python.org>
parents:
24263
diff
changeset
|
985 'sunos5': |
|
1cebce50fe71
Add a rather generous set of tests allowed to be skipped on sunos5.
Guido van Rossum <guido@python.org>
parents:
24263
diff
changeset
|
986 """ |
|
1cebce50fe71
Add a rather generous set of tests allowed to be skipped on sunos5.
Guido van Rossum <guido@python.org>
parents:
24263
diff
changeset
|
987 test_bsddb |
|
28993
f1fcac4cabad
the new bsddb185 module is an expected skip on most platforms (this may not
Skip Montanaro <skip@pobox.com>
parents:
28798
diff
changeset
|
988 test_bsddb185 |
|
24274
1cebce50fe71
Add a rather generous set of tests allowed to be skipped on sunos5.
Guido van Rossum <guido@python.org>
parents:
24263
diff
changeset
|
989 test_curses |
|
1cebce50fe71
Add a rather generous set of tests allowed to be skipped on sunos5.
Guido van Rossum <guido@python.org>
parents:
24263
diff
changeset
|
990 test_dbm |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
991 test_epoll |
|
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
992 test_kqueue |
|
24274
1cebce50fe71
Add a rather generous set of tests allowed to be skipped on sunos5.
Guido van Rossum <guido@python.org>
parents:
24263
diff
changeset
|
993 test_gdbm |
|
1cebce50fe71
Add a rather generous set of tests allowed to be skipped on sunos5.
Guido van Rossum <guido@python.org>
parents:
24263
diff
changeset
|
994 test_gzip |
|
1cebce50fe71
Add a rather generous set of tests allowed to be skipped on sunos5.
Guido van Rossum <guido@python.org>
parents:
24263
diff
changeset
|
995 test_openpty |
|
1cebce50fe71
Add a rather generous set of tests allowed to be skipped on sunos5.
Guido van Rossum <guido@python.org>
parents:
24263
diff
changeset
|
996 test_zipfile |
|
1cebce50fe71
Add a rather generous set of tests allowed to be skipped on sunos5.
Guido van Rossum <guido@python.org>
parents:
24263
diff
changeset
|
997 test_zlib |
| 24277 | 998 """, |
|
22287
e4e54fc5fb3d
first cut at skip-list for hp-ux 11 based upon input from Bill Lawler at HP.
Skip Montanaro <skip@pobox.com>
parents:
21890
diff
changeset
|
999 'hp-ux11': |
|
e4e54fc5fb3d
first cut at skip-list for hp-ux 11 based upon input from Bill Lawler at HP.
Skip Montanaro <skip@pobox.com>
parents:
21890
diff
changeset
|
1000 """ |
|
e4e54fc5fb3d
first cut at skip-list for hp-ux 11 based upon input from Bill Lawler at HP.
Skip Montanaro <skip@pobox.com>
parents:
21890
diff
changeset
|
1001 test_bsddb |
|
28993
f1fcac4cabad
the new bsddb185 module is an expected skip on most platforms (this may not
Skip Montanaro <skip@pobox.com>
parents:
28798
diff
changeset
|
1002 test_bsddb185 |
|
22287
e4e54fc5fb3d
first cut at skip-list for hp-ux 11 based upon input from Bill Lawler at HP.
Skip Montanaro <skip@pobox.com>
parents:
21890
diff
changeset
|
1003 test_curses |
|
e4e54fc5fb3d
first cut at skip-list for hp-ux 11 based upon input from Bill Lawler at HP.
Skip Montanaro <skip@pobox.com>
parents:
21890
diff
changeset
|
1004 test_dl |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
1005 test_epoll |
|
22287
e4e54fc5fb3d
first cut at skip-list for hp-ux 11 based upon input from Bill Lawler at HP.
Skip Montanaro <skip@pobox.com>
parents:
21890
diff
changeset
|
1006 test_gdbm |
|
e4e54fc5fb3d
first cut at skip-list for hp-ux 11 based upon input from Bill Lawler at HP.
Skip Montanaro <skip@pobox.com>
parents:
21890
diff
changeset
|
1007 test_gzip |
|
e4e54fc5fb3d
first cut at skip-list for hp-ux 11 based upon input from Bill Lawler at HP.
Skip Montanaro <skip@pobox.com>
parents:
21890
diff
changeset
|
1008 test_largefile |
|
e4e54fc5fb3d
first cut at skip-list for hp-ux 11 based upon input from Bill Lawler at HP.
Skip Montanaro <skip@pobox.com>
parents:
21890
diff
changeset
|
1009 test_locale |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
1010 test_kqueue |
|
22287
e4e54fc5fb3d
first cut at skip-list for hp-ux 11 based upon input from Bill Lawler at HP.
Skip Montanaro <skip@pobox.com>
parents:
21890
diff
changeset
|
1011 test_minidom |
|
e4e54fc5fb3d
first cut at skip-list for hp-ux 11 based upon input from Bill Lawler at HP.
Skip Montanaro <skip@pobox.com>
parents:
21890
diff
changeset
|
1012 test_openpty |
|
e4e54fc5fb3d
first cut at skip-list for hp-ux 11 based upon input from Bill Lawler at HP.
Skip Montanaro <skip@pobox.com>
parents:
21890
diff
changeset
|
1013 test_pyexpat |
|
e4e54fc5fb3d
first cut at skip-list for hp-ux 11 based upon input from Bill Lawler at HP.
Skip Montanaro <skip@pobox.com>
parents:
21890
diff
changeset
|
1014 test_sax |
|
e4e54fc5fb3d
first cut at skip-list for hp-ux 11 based upon input from Bill Lawler at HP.
Skip Montanaro <skip@pobox.com>
parents:
21890
diff
changeset
|
1015 test_zipfile |
|
e4e54fc5fb3d
first cut at skip-list for hp-ux 11 based upon input from Bill Lawler at HP.
Skip Montanaro <skip@pobox.com>
parents:
21890
diff
changeset
|
1016 test_zlib |
|
e4e54fc5fb3d
first cut at skip-list for hp-ux 11 based upon input from Bill Lawler at HP.
Skip Montanaro <skip@pobox.com>
parents:
21890
diff
changeset
|
1017 """, |
|
23777
bec1b942e0bc
Patch #488073: AtheOS port.
Martin v. Löwis <martin@v.loewis.de>
parents:
23733
diff
changeset
|
1018 'atheos': |
|
24263
e6033254df21
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
24113
diff
changeset
|
1019 """ |
|
28993
f1fcac4cabad
the new bsddb185 module is an expected skip on most platforms (this may not
Skip Montanaro <skip@pobox.com>
parents:
28798
diff
changeset
|
1020 test_bsddb185 |
|
24263
e6033254df21
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
24113
diff
changeset
|
1021 test_curses |
|
e6033254df21
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
24113
diff
changeset
|
1022 test_dl |
|
e6033254df21
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
24113
diff
changeset
|
1023 test_gdbm |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
1024 test_epoll |
|
24263
e6033254df21
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
24113
diff
changeset
|
1025 test_largefile |
|
e6033254df21
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
24113
diff
changeset
|
1026 test_locale |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
1027 test_kqueue |
|
24263
e6033254df21
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
24113
diff
changeset
|
1028 test_mhlib |
|
e6033254df21
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
24113
diff
changeset
|
1029 test_mmap |
|
e6033254df21
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
24113
diff
changeset
|
1030 test_poll |
|
e6033254df21
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
24113
diff
changeset
|
1031 test_popen2 |
|
e6033254df21
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
24113
diff
changeset
|
1032 test_resource |
|
e6033254df21
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
24113
diff
changeset
|
1033 """, |
|
26538
2621968319f0
Patch #551977: Regression exceptions for cygwin
Jason Tishler <jason@tishler.net>
parents:
26527
diff
changeset
|
1034 'cygwin': |
|
2621968319f0
Patch #551977: Regression exceptions for cygwin
Jason Tishler <jason@tishler.net>
parents:
26527
diff
changeset
|
1035 """ |
|
28993
f1fcac4cabad
the new bsddb185 module is an expected skip on most platforms (this may not
Skip Montanaro <skip@pobox.com>
parents:
28798
diff
changeset
|
1036 test_bsddb185 |
|
26539
0e6e39fb9cd7
Add a Cygwin skip mentioned by Jason Tishler.
Tim Peters <tim.peters@gmail.com>
parents:
26538
diff
changeset
|
1037 test_bsddb3 |
|
26538
2621968319f0
Patch #551977: Regression exceptions for cygwin
Jason Tishler <jason@tishler.net>
parents:
26527
diff
changeset
|
1038 test_curses |
|
2621968319f0
Patch #551977: Regression exceptions for cygwin
Jason Tishler <jason@tishler.net>
parents:
26527
diff
changeset
|
1039 test_dbm |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
1040 test_epoll |
|
29974
d37f13199d95
Patch #775784: YA Cygwin expected regression test skip patch
Jason Tishler <jason@tishler.net>
parents:
29374
diff
changeset
|
1041 test_ioctl |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
1042 test_kqueue |
|
26538
2621968319f0
Patch #551977: Regression exceptions for cygwin
Jason Tishler <jason@tishler.net>
parents:
26527
diff
changeset
|
1043 test_largefile |
|
2621968319f0
Patch #551977: Regression exceptions for cygwin
Jason Tishler <jason@tishler.net>
parents:
26527
diff
changeset
|
1044 test_locale |
|
27700
614abba5b762
Patch #551977: Regression exceptions for cygwin
Jason Tishler <jason@tishler.net>
parents:
27636
diff
changeset
|
1045 test_ossaudiodev |
|
26538
2621968319f0
Patch #551977: Regression exceptions for cygwin
Jason Tishler <jason@tishler.net>
parents:
26527
diff
changeset
|
1046 test_socketserver |
|
2621968319f0
Patch #551977: Regression exceptions for cygwin
Jason Tishler <jason@tishler.net>
parents:
26527
diff
changeset
|
1047 """, |
|
26938
a82d92f78472
add list of expected skips for the OS/2 EMX port
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents:
26900
diff
changeset
|
1048 'os2emx': |
|
a82d92f78472
add list of expected skips for the OS/2 EMX port
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents:
26900
diff
changeset
|
1049 """ |
|
a82d92f78472
add list of expected skips for the OS/2 EMX port
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents:
26900
diff
changeset
|
1050 test_audioop |
|
28993
f1fcac4cabad
the new bsddb185 module is an expected skip on most platforms (this may not
Skip Montanaro <skip@pobox.com>
parents:
28798
diff
changeset
|
1051 test_bsddb185 |
|
26938
a82d92f78472
add list of expected skips for the OS/2 EMX port
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents:
26900
diff
changeset
|
1052 test_bsddb3 |
|
a82d92f78472
add list of expected skips for the OS/2 EMX port
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents:
26900
diff
changeset
|
1053 test_commands |
|
a82d92f78472
add list of expected skips for the OS/2 EMX port
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents:
26900
diff
changeset
|
1054 test_curses |
|
a82d92f78472
add list of expected skips for the OS/2 EMX port
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents:
26900
diff
changeset
|
1055 test_dl |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
1056 test_epoll |
|
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
1057 test_kqueue |
|
26938
a82d92f78472
add list of expected skips for the OS/2 EMX port
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents:
26900
diff
changeset
|
1058 test_largefile |
|
a82d92f78472
add list of expected skips for the OS/2 EMX port
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents:
26900
diff
changeset
|
1059 test_mhlib |
|
a82d92f78472
add list of expected skips for the OS/2 EMX port
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents:
26900
diff
changeset
|
1060 test_mmap |
|
a82d92f78472
add list of expected skips for the OS/2 EMX port
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents:
26900
diff
changeset
|
1061 test_openpty |
|
a82d92f78472
add list of expected skips for the OS/2 EMX port
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents:
26900
diff
changeset
|
1062 test_ossaudiodev |
|
a82d92f78472
add list of expected skips for the OS/2 EMX port
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents:
26900
diff
changeset
|
1063 test_pty |
|
a82d92f78472
add list of expected skips for the OS/2 EMX port
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents:
26900
diff
changeset
|
1064 test_resource |
|
a82d92f78472
add list of expected skips for the OS/2 EMX port
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents:
26900
diff
changeset
|
1065 test_signal |
|
a82d92f78472
add list of expected skips for the OS/2 EMX port
Andrew MacIntyre <andymac@bullseye.apana.org.au>
parents:
26900
diff
changeset
|
1066 """, |
|
30989
4f6382d2809d
test_applesingle is an expected skip almost anywhere.
Guido van Rossum <guido@python.org>
parents:
30987
diff
changeset
|
1067 'freebsd4': |
|
4f6382d2809d
test_applesingle is an expected skip almost anywhere.
Guido van Rossum <guido@python.org>
parents:
30987
diff
changeset
|
1068 """ |
|
4f6382d2809d
test_applesingle is an expected skip almost anywhere.
Guido van Rossum <guido@python.org>
parents:
30987
diff
changeset
|
1069 test_bsddb |
|
4f6382d2809d
test_applesingle is an expected skip almost anywhere.
Guido van Rossum <guido@python.org>
parents:
30987
diff
changeset
|
1070 test_bsddb3 |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
1071 test_epoll |
|
33180
aad118643598
Add support for FreeBSD 6.
Hye-Shik Chang <hyeshik@gmail.com>
parents:
33105
diff
changeset
|
1072 test_gdbm |
|
30989
4f6382d2809d
test_applesingle is an expected skip almost anywhere.
Guido van Rossum <guido@python.org>
parents:
30987
diff
changeset
|
1073 test_locale |
|
4f6382d2809d
test_applesingle is an expected skip almost anywhere.
Guido van Rossum <guido@python.org>
parents:
30987
diff
changeset
|
1074 test_ossaudiodev |
|
4f6382d2809d
test_applesingle is an expected skip almost anywhere.
Guido van Rossum <guido@python.org>
parents:
30987
diff
changeset
|
1075 test_pep277 |
|
33180
aad118643598
Add support for FreeBSD 6.
Hye-Shik Chang <hyeshik@gmail.com>
parents:
33105
diff
changeset
|
1076 test_pty |
|
30989
4f6382d2809d
test_applesingle is an expected skip almost anywhere.
Guido van Rossum <guido@python.org>
parents:
30987
diff
changeset
|
1077 test_socketserver |
|
33180
aad118643598
Add support for FreeBSD 6.
Hye-Shik Chang <hyeshik@gmail.com>
parents:
33105
diff
changeset
|
1078 test_tcl |
|
51487
6745bdaa9b49
Some tests for Tkinter.Text.search
Guilherme Polo <ggpolo@gmail.com>
parents:
51140
diff
changeset
|
1079 test_tk |
|
51138
946340fb114b
* Renaming test_tk_* to test_ttk_* since that is what they are testing.
Guilherme Polo <ggpolo@gmail.com>
parents:
49346
diff
changeset
|
1080 test_ttk_guionly |
|
946340fb114b
* Renaming test_tk_* to test_ttk_* since that is what they are testing.
Guilherme Polo <ggpolo@gmail.com>
parents:
49346
diff
changeset
|
1081 test_ttk_textonly |
|
30989
4f6382d2809d
test_applesingle is an expected skip almost anywhere.
Guido van Rossum <guido@python.org>
parents:
30987
diff
changeset
|
1082 test_timeout |
|
4f6382d2809d
test_applesingle is an expected skip almost anywhere.
Guido van Rossum <guido@python.org>
parents:
30987
diff
changeset
|
1083 test_urllibnet |
|
49346
b4964df64384
issue3770: if SEM_OPEN is 0, disable the mp.synchronize module, rev. Nick Coghlan, Damien Miller
Jesse Noller <jnoller@gmail.com>
parents:
48017
diff
changeset
|
1084 test_multiprocessing |
|
29374
23f6101cc87e
Patch #746801: FreeBSD 4 expected failures, by Charles Swiger.
Martin v. Löwis <martin@v.loewis.de>
parents:
29155
diff
changeset
|
1085 """, |
|
35550
724bbd489ad4
- Changes donated by Elemental Security to make it work on AIX 5.3
Guido van Rossum <guido@python.org>
parents:
35375
diff
changeset
|
1086 'aix5': |
|
724bbd489ad4
- Changes donated by Elemental Security to make it work on AIX 5.3
Guido van Rossum <guido@python.org>
parents:
35375
diff
changeset
|
1087 """ |
|
724bbd489ad4
- Changes donated by Elemental Security to make it work on AIX 5.3
Guido van Rossum <guido@python.org>
parents:
35375
diff
changeset
|
1088 test_bsddb |
|
724bbd489ad4
- Changes donated by Elemental Security to make it work on AIX 5.3
Guido van Rossum <guido@python.org>
parents:
35375
diff
changeset
|
1089 test_bsddb185 |
|
724bbd489ad4
- Changes donated by Elemental Security to make it work on AIX 5.3
Guido van Rossum <guido@python.org>
parents:
35375
diff
changeset
|
1090 test_bsddb3 |
|
724bbd489ad4
- Changes donated by Elemental Security to make it work on AIX 5.3
Guido van Rossum <guido@python.org>
parents:
35375
diff
changeset
|
1091 test_bz2 |
|
724bbd489ad4
- Changes donated by Elemental Security to make it work on AIX 5.3
Guido van Rossum <guido@python.org>
parents:
35375
diff
changeset
|
1092 test_dl |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
1093 test_epoll |
|
35550
724bbd489ad4
- Changes donated by Elemental Security to make it work on AIX 5.3
Guido van Rossum <guido@python.org>
parents:
35375
diff
changeset
|
1094 test_gdbm |
|
724bbd489ad4
- Changes donated by Elemental Security to make it work on AIX 5.3
Guido van Rossum <guido@python.org>
parents:
35375
diff
changeset
|
1095 test_gzip |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
1096 test_kqueue |
|
35550
724bbd489ad4
- Changes donated by Elemental Security to make it work on AIX 5.3
Guido van Rossum <guido@python.org>
parents:
35375
diff
changeset
|
1097 test_ossaudiodev |
|
724bbd489ad4
- Changes donated by Elemental Security to make it work on AIX 5.3
Guido van Rossum <guido@python.org>
parents:
35375
diff
changeset
|
1098 test_tcl |
|
51487
6745bdaa9b49
Some tests for Tkinter.Text.search
Guilherme Polo <ggpolo@gmail.com>
parents:
51140
diff
changeset
|
1099 test_tk |
|
51138
946340fb114b
* Renaming test_tk_* to test_ttk_* since that is what they are testing.
Guilherme Polo <ggpolo@gmail.com>
parents:
49346
diff
changeset
|
1100 test_ttk_guionly |
|
946340fb114b
* Renaming test_tk_* to test_ttk_* since that is what they are testing.
Guilherme Polo <ggpolo@gmail.com>
parents:
49346
diff
changeset
|
1101 test_ttk_textonly |
|
35550
724bbd489ad4
- Changes donated by Elemental Security to make it work on AIX 5.3
Guido van Rossum <guido@python.org>
parents:
35375
diff
changeset
|
1102 test_zipimport |
|
724bbd489ad4
- Changes donated by Elemental Security to make it work on AIX 5.3
Guido van Rossum <guido@python.org>
parents:
35375
diff
changeset
|
1103 test_zlib |
|
724bbd489ad4
- Changes donated by Elemental Security to make it work on AIX 5.3
Guido van Rossum <guido@python.org>
parents:
35375
diff
changeset
|
1104 """, |
|
37226
799b40c4a2c6
Patch from Aldo Cortesi: expected skips for OpenBSD.
Martin v. Löwis <martin@v.loewis.de>
parents:
37135
diff
changeset
|
1105 'openbsd3': |
|
799b40c4a2c6
Patch from Aldo Cortesi: expected skips for OpenBSD.
Martin v. Löwis <martin@v.loewis.de>
parents:
37135
diff
changeset
|
1106 """ |
|
799b40c4a2c6
Patch from Aldo Cortesi: expected skips for OpenBSD.
Martin v. Löwis <martin@v.loewis.de>
parents:
37135
diff
changeset
|
1107 test_bsddb |
|
799b40c4a2c6
Patch from Aldo Cortesi: expected skips for OpenBSD.
Martin v. Löwis <martin@v.loewis.de>
parents:
37135
diff
changeset
|
1108 test_bsddb3 |
|
799b40c4a2c6
Patch from Aldo Cortesi: expected skips for OpenBSD.
Martin v. Löwis <martin@v.loewis.de>
parents:
37135
diff
changeset
|
1109 test_ctypes |
|
799b40c4a2c6
Patch from Aldo Cortesi: expected skips for OpenBSD.
Martin v. Löwis <martin@v.loewis.de>
parents:
37135
diff
changeset
|
1110 test_dl |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
1111 test_epoll |
|
37226
799b40c4a2c6
Patch from Aldo Cortesi: expected skips for OpenBSD.
Martin v. Löwis <martin@v.loewis.de>
parents:
37135
diff
changeset
|
1112 test_gdbm |
|
799b40c4a2c6
Patch from Aldo Cortesi: expected skips for OpenBSD.
Martin v. Löwis <martin@v.loewis.de>
parents:
37135
diff
changeset
|
1113 test_locale |
|
799b40c4a2c6
Patch from Aldo Cortesi: expected skips for OpenBSD.
Martin v. Löwis <martin@v.loewis.de>
parents:
37135
diff
changeset
|
1114 test_normalization |
|
799b40c4a2c6
Patch from Aldo Cortesi: expected skips for OpenBSD.
Martin v. Löwis <martin@v.loewis.de>
parents:
37135
diff
changeset
|
1115 test_ossaudiodev |
|
799b40c4a2c6
Patch from Aldo Cortesi: expected skips for OpenBSD.
Martin v. Löwis <martin@v.loewis.de>
parents:
37135
diff
changeset
|
1116 test_pep277 |
|
799b40c4a2c6
Patch from Aldo Cortesi: expected skips for OpenBSD.
Martin v. Löwis <martin@v.loewis.de>
parents:
37135
diff
changeset
|
1117 test_tcl |
|
51487
6745bdaa9b49
Some tests for Tkinter.Text.search
Guilherme Polo <ggpolo@gmail.com>
parents:
51140
diff
changeset
|
1118 test_tk |
|
51138
946340fb114b
* Renaming test_tk_* to test_ttk_* since that is what they are testing.
Guilherme Polo <ggpolo@gmail.com>
parents:
49346
diff
changeset
|
1119 test_ttk_guionly |
|
946340fb114b
* Renaming test_tk_* to test_ttk_* since that is what they are testing.
Guilherme Polo <ggpolo@gmail.com>
parents:
49346
diff
changeset
|
1120 test_ttk_textonly |
|
49346
b4964df64384
issue3770: if SEM_OPEN is 0, disable the mp.synchronize module, rev. Nick Coghlan, Damien Miller
Jesse Noller <jnoller@gmail.com>
parents:
48017
diff
changeset
|
1121 test_multiprocessing |
|
37226
799b40c4a2c6
Patch from Aldo Cortesi: expected skips for OpenBSD.
Martin v. Löwis <martin@v.loewis.de>
parents:
37135
diff
changeset
|
1122 """, |
|
38902
69ef23fcf5f8
Patch #1509001: expected skips for netbsd3.
Georg Brandl <georg@python.org>
parents:
38741
diff
changeset
|
1123 'netbsd3': |
|
69ef23fcf5f8
Patch #1509001: expected skips for netbsd3.
Georg Brandl <georg@python.org>
parents:
38741
diff
changeset
|
1124 """ |
|
69ef23fcf5f8
Patch #1509001: expected skips for netbsd3.
Georg Brandl <georg@python.org>
parents:
38741
diff
changeset
|
1125 test_bsddb |
|
69ef23fcf5f8
Patch #1509001: expected skips for netbsd3.
Georg Brandl <georg@python.org>
parents:
38741
diff
changeset
|
1126 test_bsddb185 |
|
69ef23fcf5f8
Patch #1509001: expected skips for netbsd3.
Georg Brandl <georg@python.org>
parents:
38741
diff
changeset
|
1127 test_bsddb3 |
|
69ef23fcf5f8
Patch #1509001: expected skips for netbsd3.
Georg Brandl <georg@python.org>
parents:
38741
diff
changeset
|
1128 test_ctypes |
|
69ef23fcf5f8
Patch #1509001: expected skips for netbsd3.
Georg Brandl <georg@python.org>
parents:
38741
diff
changeset
|
1129 test_curses |
|
69ef23fcf5f8
Patch #1509001: expected skips for netbsd3.
Georg Brandl <georg@python.org>
parents:
38741
diff
changeset
|
1130 test_dl |
|
45991
728dc13327b2
Applied patch #1657 epoll and kqueue wrappers for the select module
Christian Heimes <christian@cheimes.de>
parents:
45989
diff
changeset
|
1131 test_epoll |
|
38902
69ef23fcf5f8
Patch #1509001: expected skips for netbsd3.
Georg Brandl <georg@python.org>
parents:
38741
diff
changeset
|
1132 test_gdbm |
|
69ef23fcf5f8
Patch #1509001: expected skips for netbsd3.
Georg Brandl <georg@python.org>
parents:
38741
diff
changeset
|
1133 test_locale |
|
69ef23fcf5f8
Patch #1509001: expected skips for netbsd3.
Georg Brandl <georg@python.org>
parents:
38741
diff
changeset
|
1134 test_ossaudiodev |
|
69ef23fcf5f8
Patch #1509001: expected skips for netbsd3.
Georg Brandl <georg@python.org>
parents:
38741
diff
changeset
|
1135 test_pep277 |
|
69ef23fcf5f8
Patch #1509001: expected skips for netbsd3.
Georg Brandl <georg@python.org>
parents:
38741
diff
changeset
|
1136 test_tcl |
|
51487
6745bdaa9b49
Some tests for Tkinter.Text.search
Guilherme Polo <ggpolo@gmail.com>
parents:
51140
diff
changeset
|
1137 test_tk |
|
51138
946340fb114b
* Renaming test_tk_* to test_ttk_* since that is what they are testing.
Guilherme Polo <ggpolo@gmail.com>
parents:
49346
diff
changeset
|
1138 test_ttk_guionly |
|
946340fb114b
* Renaming test_tk_* to test_ttk_* since that is what they are testing.
Guilherme Polo <ggpolo@gmail.com>
parents:
49346
diff
changeset
|
1139 test_ttk_textonly |
|
49346
b4964df64384
issue3770: if SEM_OPEN is 0, disable the mp.synchronize module, rev. Nick Coghlan, Damien Miller
Jesse Noller <jnoller@gmail.com>
parents:
48017
diff
changeset
|
1140 test_multiprocessing |
|
38902
69ef23fcf5f8
Patch #1509001: expected skips for netbsd3.
Georg Brandl <georg@python.org>
parents:
38741
diff
changeset
|
1141 """, |
|
19189
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
1142 } |
|
32815
ee7b84101160
Patch #995782: Add FreeBSD 5 expectations. Will backport to 2.3.
Martin v. Löwis <martin@v.loewis.de>
parents:
32754
diff
changeset
|
1143 _expectations['freebsd5'] = _expectations['freebsd4'] |
|
33180
aad118643598
Add support for FreeBSD 6.
Hye-Shik Chang <hyeshik@gmail.com>
parents:
33105
diff
changeset
|
1144 _expectations['freebsd6'] = _expectations['freebsd4'] |
|
35238
526faaab00eb
Add support for FreeBSD 7.
Hye-Shik Chang <hyeshik@gmail.com>
parents:
35077
diff
changeset
|
1145 _expectations['freebsd7'] = _expectations['freebsd4'] |
|
43703
365913d7af7d
Enable platform-specific tweaks for FreeBSD 8 (exactly same to FreeBSD 7's yet)
Hye-Shik Chang <hyeshik@gmail.com>
parents:
43325
diff
changeset
|
1146 _expectations['freebsd8'] = _expectations['freebsd4'] |
|
19189
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
1147 |
|
19186
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
1148 class _ExpectedSkips: |
|
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
1149 def __init__(self): |
|
25674
62853195be68
Logic for determining whether skipping test_pep277 is expected: whether
Tim Peters <tim.peters@gmail.com>
parents:
25617
diff
changeset
|
1150 import os.path |
|
28112
2c8c2c6b2ab7
Fix SF bugs #692951 and 692988, test_timeout.py needs 'network' resource
Neal Norwitz <nnorwitz@gmail.com>
parents:
28081
diff
changeset
|
1151 from test import test_timeout |
|
26391
d207d1d78c5d
Fiddled things so that test_normalization is expected to be skipped if
Tim Peters <tim.peters@gmail.com>
parents:
26389
diff
changeset
|
1152 |
|
25001
fcb5201c69ed
Got rid of the toy _Set class, in favor of sets.Set.
Tim Peters <tim.peters@gmail.com>
parents:
24829
diff
changeset
|
1153 self.valid = False |
|
22723
1e3062e69f2c
We expect to skip the new test_mpz on Windows.
Tim Peters <tim.peters@gmail.com>
parents:
22287
diff
changeset
|
1154 if sys.platform in _expectations: |
|
19189
115e4099f3d9
Add the list of expected skips for Linux 2.x. Restructured the code a
Guido van Rossum <guido@python.org>
parents:
19188
diff
changeset
|
1155 s = _expectations[sys.platform] |
|
30929
54ff68e973ee
* Migrate set() and frozenset() from the sandbox.
Raymond Hettinger <python@rcn.com>
parents:
30686
diff
changeset
|
1156 self.expected = set(s.split()) |
|
26391
d207d1d78c5d
Fiddled things so that test_normalization is expected to be skipped if
Tim Peters <tim.peters@gmail.com>
parents:
26389
diff
changeset
|
1157 |
|
42221
2c33df09c1c7
Patch #1731169: clean up expected skips list.
Georg Brandl <georg@python.org>
parents:
41793
diff
changeset
|
1158 # expected to be skipped on every platform, even Linux |
|
2c33df09c1c7
Patch #1731169: clean up expected skips list.
Georg Brandl <georg@python.org>
parents:
41793
diff
changeset
|
1159 self.expected.add('test_linuxaudiodev') |
|
2c33df09c1c7
Patch #1731169: clean up expected skips list.
Georg Brandl <georg@python.org>
parents:
41793
diff
changeset
|
1160 |
|
25674
62853195be68
Logic for determining whether skipping test_pep277 is expected: whether
Tim Peters <tim.peters@gmail.com>
parents:
25617
diff
changeset
|
1161 if not os.path.supports_unicode_filenames: |
|
62853195be68
Logic for determining whether skipping test_pep277 is expected: whether
Tim Peters <tim.peters@gmail.com>
parents:
25617
diff
changeset
|
1162 self.expected.add('test_pep277') |
|
26391
d207d1d78c5d
Fiddled things so that test_normalization is expected to be skipped if
Tim Peters <tim.peters@gmail.com>
parents:
26389
diff
changeset
|
1163 |
|
28112
2c8c2c6b2ab7
Fix SF bugs #692951 and 692988, test_timeout.py needs 'network' resource
Neal Norwitz <nnorwitz@gmail.com>
parents:
28081
diff
changeset
|
1164 if test_timeout.skip_expected: |
|
2c8c2c6b2ab7
Fix SF bugs #692951 and 692988, test_timeout.py needs 'network' resource
Neal Norwitz <nnorwitz@gmail.com>
parents:
28081
diff
changeset
|
1165 self.expected.add('test_timeout') |
|
2c8c2c6b2ab7
Fix SF bugs #692951 and 692988, test_timeout.py needs 'network' resource
Neal Norwitz <nnorwitz@gmail.com>
parents:
28081
diff
changeset
|
1166 |
|
33986
49b6e966e57f
Patch #1050475: Fix various x86_64 build issues
Martin v. Löwis <martin@v.loewis.de>
parents:
33982
diff
changeset
|
1167 if sys.maxint == 9223372036854775807L: |
|
49b6e966e57f
Patch #1050475: Fix various x86_64 build issues
Martin v. Löwis <martin@v.loewis.de>
parents:
33982
diff
changeset
|
1168 self.expected.add('test_imageop') |
|
49b6e966e57f
Patch #1050475: Fix various x86_64 build issues
Martin v. Löwis <martin@v.loewis.de>
parents:
33982
diff
changeset
|
1169 |
|
27519
81a2d188ea1f
- The mac-specific tests should also be run on darwin.
Jack Jansen <jack.jansen@cwi.nl>
parents:
27504
diff
changeset
|
1170 if not sys.platform in ("mac", "darwin"): |
|
47770
e107062aa9cd
test_macos can be skipped on non-mac platforms.
Amaury Forgeot d'Arc <amauryfa@gmail.com>
parents:
47189
diff
changeset
|
1171 MAC_ONLY = ["test_macos", "test_macostools", "test_aepack", |
|
42221
2c33df09c1c7
Patch #1731169: clean up expected skips list.
Georg Brandl <georg@python.org>
parents:
41793
diff
changeset
|
1172 "test_plistlib", "test_scriptpackages", |
|
2c33df09c1c7
Patch #1731169: clean up expected skips list.
Georg Brandl <georg@python.org>
parents:
41793
diff
changeset
|
1173 "test_applesingle"] |
|
28438
d7001fadfefc
Move Mac/Windows specific expected skips from each platform list
Neal Norwitz <nnorwitz@gmail.com>
parents:
28277
diff
changeset
|
1174 for skip in MAC_ONLY: |
|
d7001fadfefc
Move Mac/Windows specific expected skips from each platform list
Neal Norwitz <nnorwitz@gmail.com>
parents:
28277
diff
changeset
|
1175 self.expected.add(skip) |
|
47773
db62c448a349
skip test_macostools when UCS4 is enabled
Benjamin Peterson <benjamin@python.org>
parents:
47770
diff
changeset
|
1176 elif len(u'\0'.encode('unicode-internal')) == 4: |
|
db62c448a349
skip test_macostools when UCS4 is enabled
Benjamin Peterson <benjamin@python.org>
parents:
47770
diff
changeset
|
1177 self.expected.add("test_macostools") |
|
db62c448a349
skip test_macostools when UCS4 is enabled
Benjamin Peterson <benjamin@python.org>
parents:
47770
diff
changeset
|
1178 |
|
27504
0dd8d8a76015
Expect test_macostools and test_macfs to get skipped whenever
Tim Peters <tim.peters@gmail.com>
parents:
27420
diff
changeset
|
1179 |
|
0dd8d8a76015
Expect test_macostools and test_macfs to get skipped whenever
Tim Peters <tim.peters@gmail.com>
parents:
27420
diff
changeset
|
1180 if sys.platform != "win32": |
|
42221
2c33df09c1c7
Patch #1731169: clean up expected skips list.
Georg Brandl <georg@python.org>
parents:
41793
diff
changeset
|
1181 # test_sqlite is only reliable on Windows where the library |
|
2c33df09c1c7
Patch #1731169: clean up expected skips list.
Georg Brandl <georg@python.org>
parents:
41793
diff
changeset
|
1182 # is distributed with Python |
|
28438
d7001fadfefc
Move Mac/Windows specific expected skips from each platform list
Neal Norwitz <nnorwitz@gmail.com>
parents:
28277
diff
changeset
|
1183 WIN_ONLY = ["test_unicode_file", "test_winreg", |
|
42221
2c33df09c1c7
Patch #1731169: clean up expected skips list.
Georg Brandl <georg@python.org>
parents:
41793
diff
changeset
|
1184 "test_winsound", "test_startfile", |
|
2c33df09c1c7
Patch #1731169: clean up expected skips list.
Georg Brandl <georg@python.org>
parents:
41793
diff
changeset
|
1185 "test_sqlite"] |
|
28438
d7001fadfefc
Move Mac/Windows specific expected skips from each platform list
Neal Norwitz <nnorwitz@gmail.com>
parents:
28277
diff
changeset
|
1186 for skip in WIN_ONLY: |
|
d7001fadfefc
Move Mac/Windows specific expected skips from each platform list
Neal Norwitz <nnorwitz@gmail.com>
parents:
28277
diff
changeset
|
1187 self.expected.add(skip) |
|
27963
226463445697
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
27922
diff
changeset
|
1188 |
|
41784
b7fb942b403e
Remove the rgbimg module. It has been deprecated since Python 2.5.
Brett Cannon <bcannon@gmail.com>
parents:
41686
diff
changeset
|
1189 if sys.platform != 'irix': |
|
42221
2c33df09c1c7
Patch #1731169: clean up expected skips list.
Georg Brandl <georg@python.org>
parents:
41793
diff
changeset
|
1190 IRIX_ONLY = ["test_imageop", "test_al", "test_cd", "test_cl", |
|
2c33df09c1c7
Patch #1731169: clean up expected skips list.
Georg Brandl <georg@python.org>
parents:
41793
diff
changeset
|
1191 "test_gl", "test_imgfile"] |
|
41784
b7fb942b403e
Remove the rgbimg module. It has been deprecated since Python 2.5.
Brett Cannon <bcannon@gmail.com>
parents:
41686
diff
changeset
|
1192 for skip in IRIX_ONLY: |
|
b7fb942b403e
Remove the rgbimg module. It has been deprecated since Python 2.5.
Brett Cannon <bcannon@gmail.com>
parents:
41686
diff
changeset
|
1193 self.expected.add(skip) |
|
b7fb942b403e
Remove the rgbimg module. It has been deprecated since Python 2.5.
Brett Cannon <bcannon@gmail.com>
parents:
41686
diff
changeset
|
1194 |
|
42221
2c33df09c1c7
Patch #1731169: clean up expected skips list.
Georg Brandl <georg@python.org>
parents:
41793
diff
changeset
|
1195 if sys.platform != 'sunos5': |
|
2c33df09c1c7
Patch #1731169: clean up expected skips list.
Georg Brandl <georg@python.org>
parents:
41793
diff
changeset
|
1196 self.expected.add('test_sunaudiodev') |
|
2c33df09c1c7
Patch #1731169: clean up expected skips list.
Georg Brandl <georg@python.org>
parents:
41793
diff
changeset
|
1197 self.expected.add('test_nis') |
|
2c33df09c1c7
Patch #1731169: clean up expected skips list.
Georg Brandl <georg@python.org>
parents:
41793
diff
changeset
|
1198 |
|
45989
1f8ba5e8a2fa
Replace hack in regrtest.py with use of sys.py3kwarning.
Steven Bethard <steven.bethard@gmail.com>
parents:
45881
diff
changeset
|
1199 if not sys.py3kwarning: |
|
1f8ba5e8a2fa
Replace hack in regrtest.py with use of sys.py3kwarning.
Steven Bethard <steven.bethard@gmail.com>
parents:
45881
diff
changeset
|
1200 self.expected.add('test_py3kwarn') |
|
45881
b0d01969bbc8
Have regrtest skip test_py3kwarn when the -3 flag is missing.
Steven Bethard <steven.bethard@gmail.com>
parents:
45863
diff
changeset
|
1201 |
|
25001
fcb5201c69ed
Got rid of the toy _Set class, in favor of sets.Set.
Tim Peters <tim.peters@gmail.com>
parents:
24829
diff
changeset
|
1202 self.valid = True |
|
19186
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
1203 |
|
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
1204 def isvalid(self): |
|
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
1205 "Return true iff _ExpectedSkips knows about the current platform." |
|
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
1206 return self.valid |
|
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
1207 |
|
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
1208 def getexpected(self): |
|
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
1209 """Return set of test names we expect to skip on current platform. |
|
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
1210 |
|
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
1211 self.isvalid() must be true. |
|
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
1212 """ |
|
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
1213 |
|
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
1214 assert self.isvalid() |
|
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
1215 return self.expected |
|
cdd0c7a45575
Teach regrtest which tests we *expect* to skip on Win32. Please teach it
Tim Peters <tim.peters@gmail.com>
parents:
17994
diff
changeset
|
1216 |
|
4794
80c0ca424510
New regression test harness. See usage message / doc string.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
1217 if __name__ == '__main__': |
|
24442
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
24364
diff
changeset
|
1218 # Remove regrtest.py's own directory from the module search path. This |
|
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
24364
diff
changeset
|
1219 # prevents relative imports from working, and relative imports will screw |
|
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
24364
diff
changeset
|
1220 # up the testing framework. E.g. if both test.test_support and |
|
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
24364
diff
changeset
|
1221 # test_support are imported, they will not contain the same globals, and |
|
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
24364
diff
changeset
|
1222 # much of the testing framework relies on the globals in the |
|
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
24364
diff
changeset
|
1223 # test.test_support module. |
|
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
24364
diff
changeset
|
1224 mydir = os.path.abspath(os.path.normpath(os.path.dirname(sys.argv[0]))) |
|
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
24364
diff
changeset
|
1225 i = pathlen = len(sys.path) |
|
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
24364
diff
changeset
|
1226 while i >= 0: |
|
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
24364
diff
changeset
|
1227 i -= 1 |
|
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
24364
diff
changeset
|
1228 if os.path.abspath(os.path.normpath(sys.path[i])) == mydir: |
|
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
24364
diff
changeset
|
1229 del sys.path[i] |
|
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
24364
diff
changeset
|
1230 if len(sys.path) == pathlen: |
|
226ba34bd998
Complete the absolute import patch for the test suite. All relative
Barry Warsaw <barry@python.org>
parents:
24364
diff
changeset
|
1231 print 'Could not find %r in sys.path to remove it' % mydir |
|
19417
0b11f09cf1e4
Removed --have-resources flag in favor of the more granular -u/--use
Barry Warsaw <barry@python.org>
parents:
19408
diff
changeset
|
1232 main() |
