annotate docs/ref/tests.html @ 3172:d1b367fc08bc tests-returncode

Use a return code of 1 when the tests fail.
author Thomas Kluyver <takowl@gmail.com>
date Wed, 09 Jan 2013 10:13:57 +0000
parents 0a3be7313aa4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1553
ebd545641c8b merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents: 1548
diff changeset
3
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
4 <html xmlns="http://www.w3.org/1999/xhtml">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
5 <head>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
7
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
8 <title>pygame.tests &mdash; Pygame v1.9.2 documentation</title>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
9 <link rel="stylesheet" href="../_static/pygame.css" type="text/css" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
10 <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
11 <script type="text/javascript">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
12 var DOCUMENTATION_OPTIONS = {
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
13 URL_ROOT: '../',
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
14 VERSION: '1.9.2',
2225
5f65dd2d9267 regenerate sphinx docs
Rene Dudfield <renesd@gmail.com>
parents: 2217
diff changeset
15 COLLAPSE_INDEX: false,
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
16 FILE_SUFFIX: '.html',
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
17 HAS_SOURCE: true
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
18 };
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
19 </script>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
20 <script type="text/javascript" src="../_static/jquery.js"></script>
2225
5f65dd2d9267 regenerate sphinx docs
Rene Dudfield <renesd@gmail.com>
parents: 2217
diff changeset
21 <script type="text/javascript" src="../_static/underscore.js"></script>
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
22 <script type="text/javascript" src="../_static/doctools.js"></script>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
23 <link rel="shortcut icon" href="../_static/pygame.ico"/>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
24 <link rel="top" title="Pygame v1.9.2 documentation" href="../index.html" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
25 <link rel="next" title="pygame.time" href="time.html" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
26 <link rel="prev" title="pygame.surfarray" href="surfarray.html" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
27 </head>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
28 <body>
1553
ebd545641c8b merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents: 1548
diff changeset
29
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
30 <div class="document">
1553
ebd545641c8b merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents: 1548
diff changeset
31
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
32 <div class="header">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
33 <table>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
34 <tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
35 <td class="logo">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
36 <a href="http://www.pygame.org/">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
37 <img src="../_static/pygame_tiny.png"/>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
38 </a>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
39 <h5>pygame documentation</h5>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
40 </td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
41 <td class="pagelinks">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
42 <p class="top">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
43 ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
44 <a href="http://www.pygame.org/">Pygame Home</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
45 <a href="../index.html">Help Contents</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
46 <a href="../genindex.html">Reference Index</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
47 </p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
48 <p class="bottom">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
49 <a href="camera.html">camera</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
50 <a href="cdrom.html">cdrom</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
51 <a href="color.html">Color</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
52 <a href="cursors.html">cursors</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
53 <a href="display.html">display</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
54 <a href="draw.html">draw</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
55 <a href="event.html">event</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
56 <a href="examples.html">examples</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
57 <a href="font.html">font</a> ||
3065
0a3be7313aa4 Enable pygame._freetype extension module build by default
Lenard Lindstrom <len-l@telus.net>
parents: 2239
diff changeset
58 <a href="freetype.html">freetype</a> ||
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
59 <a href="gfxdraw.html">gfxdraw</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
60 <a href="image.html">image</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
61 <a href="joystick.html">joystick</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
62 <a href="key.html">key</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
63 <a href="locals.html">locals</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
64 <a href="mask.html">mask</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
65 <a href="math.html">math</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
66 <a href="midi.html">midi</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
67 <a href="mixer.html">mixer</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
68 <a href="mouse.html">mouse</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
69 <a href="movie.html">movie</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
70 <a href="music.html">music</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
71 <a href="overlay.html">Overlay</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
72 <a href="pixelarray.html">PixelArray</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
73 <a href="pixelcopy.html">pixelcopy</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
74 <a href="pygame.html">pygame</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
75 <a href="rect.html">Rect</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
76 <a href="scrap.html">scrap</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
77 <a href="sndarray.html">sndarray</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
78 <a href="sprite.html">sprite</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
79 <a href="surface.html">Surface</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
80 <a href="surfarray.html">surfarray</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
81 <a href="tests.html">tests</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
82 <a href="time.html">time</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
83 <a href="transform.html">transform</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
84 <a href="pygame.html#module-pygame.version">version</a>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
85 </p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
86 </td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
87 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
88 </table>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
89 </div>
1553
ebd545641c8b merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents: 1548
diff changeset
90
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
91 <div class="documentwrapper">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
92 <div class="body">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
93
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
94 <div class="sectionwrapper">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
95 <div class="section" id="module-pygame.tests">
2225
5f65dd2d9267 regenerate sphinx docs
Rene Dudfield <renesd@gmail.com>
parents: 2217
diff changeset
96 <span id="pygame-tests"></span><dl class="definition module">
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
97 <dt class="title module">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
98 <tt class="docutils literal"><span class="pre">pygame.tests</span></tt></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
99 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
100 <div class="line"><span class="summaryline">Pygame unit test suite package</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
101 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
102 <table border="1" class="toc docutils">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
103 <colgroup>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
104 <col width="31%" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
105 <col width="2%" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
106 <col width="68%" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
107 </colgroup>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
108 <tbody valign="top">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
109 <tr><td><a class="toc reference external" href="tests.html#pygame.tests.run">pygame.tests.run</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
110 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
111 <td>Run the Pygame unit test suite</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
112 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
113 </tbody>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
114 </table>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
115 <p>A quick way to run the test suite package from the command line is to import
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
116 the go submodule with the Python -m option:</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
117 <div class="highlight-python"><pre>python -m pygame.tests [&lt;test options&gt;]</pre>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
118 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
119 <p>Command line option &#8211;help displays a usage message. Available options
2225
5f65dd2d9267 regenerate sphinx docs
Rene Dudfield <renesd@gmail.com>
parents: 2217
diff changeset
120 correspond to the <a class="tooltip reference internal" href="#pygame.tests.run" title=""><tt class="xref py py-func docutils literal"><span class="pre">pygame.tests.run()</span></tt><span class="tooltip-content">Run the Pygame unit test suite</span></a> arguments.</p>
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
121 <p>The xxxx_test submodules of the tests package are unit test suites for
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
122 individual parts of Pygame. Each can also be run as a main program. This is
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
123 useful if the test, such as cdrom_test, is interactive.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
124 <p>For Pygame development the test suite can be run from a Pygame distribution
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
125 root directory. Program <tt class="docutils literal"><span class="pre">run_tests.py</span></tt> is provided for convenience, though
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
126 test/go.py can be run directly.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
127 <p>Module level tags control which modules are included in a unit test run. Tags
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
128 are assigned to a unit test module with a corresponding &lt;&lt;ame&gt;_tags.py module.
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
129 The tags module has the global __tags__, a list of tag names. For example,
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
130 <tt class="docutils literal"><span class="pre">cdrom_test.py</span></tt> has a tag file <tt class="docutils literal"><span class="pre">cdrom_tags.py</span></tt> containing a tags list that
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
131 has the &#8216;interactive&#8217; string. The &#8216;interactive&#8217; tag indicates <tt class="docutils literal"><span class="pre">cdrom_test.py</span></tt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
132 expects user input. It is excluded from a <tt class="docutils literal"><span class="pre">run_tests.py</span></tt> or
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
133 <tt class="docutils literal"><span class="pre">pygame.tests.go</span></tt> run. Two other tags that are excluded are &#8216;ignore&#8217; and
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
134 &#8216;subprocess_ignore&#8217;. These two tags indicate unit tests that will not run on a
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
135 particular platform, or for which no corresponding Pygame module is available.
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
136 The test runner will list each excluded module along with the tag responsible.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
137 <dl class="definition function">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
138 <dt class="title" id="pygame.tests.run">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
139 <tt class="descclassname">pygame.tests.</tt><tt class="descname">run</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.tests.run" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
140 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
141 <div class="line"><span class="summaryline">Run the Pygame unit test suite</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
142 <div class="line"><span class="signature">run(*args, **kwds) -&gt; tuple</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
143 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
144 <p>Positional arguments (optional):</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
145 <div class="highlight-python"><pre>The names of tests to include. If omitted then all tests are run. Test names
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
146 need not include the trailing '_test'.</pre>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
147 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
148 <p>Keyword arguments:</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
149 <div class="highlight-python"><pre>incomplete - fail incomplete tests (default False)
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
150 nosubprocess - run all test suites in the current process
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
151 (default False, use separate subprocesses)
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
152 dump - dump failures/errors as dict ready to eval (default False)
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
153 file - if provided, the name of a file into which to dump failures/errors
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
154 timings - if provided, the number of times to run each individual test to
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
155 get an average run time (default is run each test once)
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
156 exclude - A list of TAG names to exclude from the run
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
157 show_output - show silenced stderr/stdout on errors (default False)
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
158 all - dump all results, not just errors (default False)
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
159 randomize - randomize order of tests (default False)
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
160 seed - if provided, a seed randomizer integer
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
161 multi_thread - if provided, the number of THREADS in which to run
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
162 subprocessed tests
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
163 time_out - if subprocess is True then the time limit in seconds before
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
164 killing a test (default 30)
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
165 fake - if provided, the name of the fake tests package in the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
166 run_tests__tests subpackage to run instead of the normal
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
167 Pygame tests
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
168 python - the path to a python executable to run subprocessed tests
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
169 (default sys.executable)</pre>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
170 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
171 <p>Return value:</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
172 <div class="highlight-python"><pre>A tuple of total number of tests run, dictionary of error information.
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
173 The dictionary is empty if no errors were recorded.</pre>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
174 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
175 <p>By default individual test modules are run in separate subprocesses. This
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
176 recreates normal Pygame usage where <tt class="docutils literal"><span class="pre">pygame.init()</span></tt> and <tt class="docutils literal"><span class="pre">pygame.quit()</span></tt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
177 are called only once per program execution, and avoids unfortunate
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
178 interactions between test modules. Also, a time limit is placed on test
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
179 execution, so frozen tests are killed when there time allotment expired. Use
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
180 the single process option if threading is not working properly or if tests
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
181 are taking too long. It is not guaranteed that all tests will pass in single
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
182 process mode.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
183 <p>Tests are run in a randomized order if the randomize argument is True or a
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
184 seed argument is provided. If no seed integer is provided then the system
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
185 time is used.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
186 <p>Individual test modules may have a __tags__ attribute, a list of tag strings
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
187 used to selectively omit modules from a run. By default only &#8216;interactive&#8217;
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
188 modules such as cdrom_test are ignored. An interactive module must be run
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
189 from the console as a Python program.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
190 <p>This function can only be called once per Python session. It is not
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
191 reentrant.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
192 </dd></dl>
1553
ebd545641c8b merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents: 1548
diff changeset
193
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
194 </dd></dl>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
195
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
196 </div>
1553
ebd545641c8b merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents: 1548
diff changeset
197
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
198 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
199 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
200 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
201 <div class="clearer"></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
202 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
203 <div class="related">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
204 <h3>Navigation</h3>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
205 <ul>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
206 <li class="right" style="margin-right: 10px">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
207 <a href="../genindex.html" title="General Index"
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
208 accesskey="I">index</a></li>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
209 <li class="right" >
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
210 <a href="time.html" title="pygame.time"
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
211 accesskey="N">next</a> |</li>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
212 <li class="right" >
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
213 <a href="surfarray.html" title="pygame.surfarray"
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
214 accesskey="P">previous</a> |</li>
2239
ca88e9308d44 regenerated html docs. Should all have doc comments from the website now.
Rene Dudfield <renesd@gmail.com>
parents: 2225
diff changeset
215 <li><a href="../index.html">Pygame v1.9.2 documentation</a> &raquo;</li>
ca88e9308d44 regenerated html docs. Should all have doc comments from the website now.
Rene Dudfield <renesd@gmail.com>
parents: 2225
diff changeset
216 <script type="text/javascript" src="jquery.plugin.docscomments.js"></script>
ca88e9308d44 regenerated html docs. Should all have doc comments from the website now.
Rene Dudfield <renesd@gmail.com>
parents: 2225
diff changeset
217
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
218 </ul>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
219 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
220 <div class="footer">
2225
5f65dd2d9267 regenerate sphinx docs
Rene Dudfield <renesd@gmail.com>
parents: 2217
diff changeset
221 &copy; Copyright 2011, Pygame Developers.
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
222 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
223 </body>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
224 </html>