1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
<title>unittest</title>
5
<meta content="text/html;charset=ISO-8859-1" name="Content-Type"/>
6
<link href="../../style.css" media="screen" rel="stylesheet" type="text/css"/></head>
9
<div><a href="http://pylib.org"><img alt="py lib" height="57" id="pyimg" src="http://codespeak.net/img/pylib.png" width="77"/></a></div>
12
<div><a class="menu" href="../../announce/release-1.2.1.html">1.2.1 ANN</a></div></div>
14
<div><a class="menu" href="../../install.html">INSTALL</a></div></div>
16
<div><a class="menu" href="../../contact.html">CONTACT</a></div></div>
18
<div><a class="menu" href="../../changelog.html">CHANGELOG</a></div></div>
20
<div><a class="menu" href="../../faq.html">FAQ</a></div></div>
24
<div><a class="menu" href="../index.html">Index</a></div>
25
<div><a class="menu" href="../quickstart.html">Quickstart</a></div>
26
<div><a class="menu" href="../features.html">Features</a></div>
27
<div><a class="menu" href="index.html">Plugins</a></div>
28
<div><a class="menu" href="../funcargs.html">Funcargs</a></div>
29
<div><a class="menu" href="../customize.html">Customize</a></div>
30
<div><a class="menu" href="../talks.html">Tutorials</a></div></div></div>
33
<h3>supporting APIs:</h3>
34
<div><a class="menu" href="../../index.html">Index</a></div>
35
<div><a class="menu" href="../../path.html">py.path</a></div>
36
<div><a class="menu" href="../../code.html">py.code</a></div></div></div></div></div>
37
<div id="contentspace">
40
<div class="section" id="automatically-discover-and-run-traditional-unittest-py-style-tests">
41
<h1>automatically discover and run traditional "unittest.py" style tests.</h1>
42
<div class="contents local topic" id="contents">
44
<li><a class="reference internal" href="#usage" id="id1">Usage</a></li>
47
<div class="section" id="usage">
48
<h2><a class="toc-backref" href="#id1">Usage</a></h2>
49
<p>This plugin collects and runs Python <a class="reference external" href="http://docs.python.org/library/unittest.html">unittest.py style</a> tests.
50
It will automatically collect <tt class="docutils literal">unittest.TestCase</tt> subclasses
51
and their <tt class="docutils literal">test</tt> methods from the test modules of a project
52
(usually following the <tt class="docutils literal"><span class="pre">test_*.py</span></tt> pattern).</p>
53
<p>This plugin is enabled by default.</p>
56
<div class="section" id="start-improving-this-plugin-in-30-seconds">
57
<h1>Start improving this plugin in 30 seconds</h1>
58
<ol class="arabic simple">
59
<li>Download <a class="reference external" href="http://bitbucket.org/hpk42/py-trunk/raw/1.2.0/py/_plugin/pytest_unittest.py">pytest_unittest.py</a> plugin source code</li>
60
<li>put it somewhere as <tt class="docutils literal">pytest_unittest.py</tt> into your import path</li>
61
<li>a subsequent <tt class="docutils literal">py.test</tt> run will use your local version</li>
63
<p>Checkout <a class="reference external" href="../customize.html">customize</a>, other <a class="reference external" href="index.html">plugins</a> or <a class="reference external" href="../../contact.html">get in contact</a>.</p>
66
<script type="text/javascript">
67
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
68
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
70
<script type="text/javascript">
72
var pageTracker = _gat._getTracker("UA-7597274-3");
73
pageTracker._trackPageview();
74
} catch(err) {}</script>
b'\\ No newline at end of file'