170 lines
9.9 KiB
HTML
170 lines
9.9 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
<title>1. py.test — py lib v1.0.0b1 documentation</title>
|
|
<link rel="stylesheet" href="_static/default.css" type="text/css" />
|
|
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
|
<script type="text/javascript">
|
|
var DOCUMENTATION_OPTIONS = {
|
|
URL_ROOT: '',
|
|
VERSION: '1.0.0b1',
|
|
COLLAPSE_MODINDEX: false,
|
|
FILE_SUFFIX: '.html',
|
|
HAS_SOURCE: true
|
|
};
|
|
</script>
|
|
<script type="text/javascript" src="_static/jquery.js"></script>
|
|
<script type="text/javascript" src="_static/doctools.js"></script>
|
|
<link rel="top" title="py lib v1.0.0b1 documentation" href="index.html" />
|
|
<link rel="next" title="1.1. Quickstart" href="test-quickstart.html" />
|
|
<link rel="prev" title="py lib: Main tools and APIs" href="index.html" />
|
|
</head>
|
|
<body>
|
|
<div class="related">
|
|
<h3>Navigation</h3>
|
|
<ul>
|
|
<li class="right" style="margin-right: 10px">
|
|
<a href="genindex.html" title="General Index"
|
|
accesskey="I">index</a></li>
|
|
<li class="right" >
|
|
<a href="test-quickstart.html" title="1.1. Quickstart"
|
|
accesskey="N">next</a> |</li>
|
|
<li class="right" >
|
|
<a href="index.html" title="py lib: Main tools and APIs"
|
|
accesskey="P">previous</a> |</li>
|
|
<li><a href="index.html">py lib v1.0.0b1 documentation</a> »</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="document">
|
|
<div class="documentwrapper">
|
|
<div class="bodywrapper">
|
|
<div class="body">
|
|
|
|
<div class="section" id="py-test">
|
|
<h1>1. py.test<a class="headerlink" href="#py-test" title="Permalink to this headline">¶</a></h1>
|
|
<p><em>py.test</em> is a tool for:</p>
|
|
<ul class="simple">
|
|
<li>rapidly writing unit- and functional tests in Python</li>
|
|
<li>writing tests for non-python code and data</li>
|
|
<li>receiving useful reports on test failures</li>
|
|
<li>distributing tests to multiple CPUs and remote environments</li>
|
|
</ul>
|
|
<p><a class="reference external" href="test-quickstart.html">quickstart</a>: for getting started immediately.</p>
|
|
<p><a class="reference external" href="test-features.html">features</a>: a walk through basic features and usage.</p>
|
|
<p><a class="reference external" href="test-plugins.html">plugins</a>: using available plugins.</p>
|
|
<p><a class="reference external" href="test-ext.html">extend</a>: writing plugins and advanced configuration.</p>
|
|
<p><a class="reference external" href="test-dist.html">distributed testing</a> how to distribute test runs to other machines and platforms.</p>
|
|
<p>Contents:</p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference external" href="test-quickstart.html">1.1. Quickstart</a><ul>
|
|
<li class="toctree-l2"><a class="reference external" href="test-quickstart.html#writing-and-running-a-test">1.1.1. Writing and running a test</a></li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference external" href="test-features.html">1.2. Features</a><ul>
|
|
<li class="toctree-l2"><a class="reference external" href="test-features.html#automatically-collects-and-executes-tests">1.2.1. automatically collects and executes tests</a></li>
|
|
<li class="toctree-l2"><a class="reference external" href="test-features.html#load-balance-tests-to-multiple-cpus">1.2.2. load-balance tests to multiple CPUs</a></li>
|
|
<li class="toctree-l2"><a class="reference external" href="test-features.html#distribute-tests-across-machines">1.2.3. Distribute tests across machines</a></li>
|
|
<li class="toctree-l2"><a class="reference external" href="test-features.html#extensive-debugging-support">1.2.4. extensive debugging support</a></li>
|
|
<li class="toctree-l2"><a class="reference external" href="test-features.html#advanced-test-selection-skipping">1.2.5. advanced test selection / skipping</a></li>
|
|
<li class="toctree-l2"><a class="reference external" href="test-features.html#generative-tests-yielding-parametrized-tests">1.2.6. generative tests: yielding parametrized tests</a></li>
|
|
<li class="toctree-l2"><a class="reference external" href="test-features.html#extensible-plugin-system">1.2.7. extensible plugin system</a></li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference external" href="test-plugins.html">1.3. Included plugins</a><ul>
|
|
<li class="toctree-l2"><a class="reference external" href="test-plugins.html#id1">1.3.1. Included plugins</a></li>
|
|
<li class="toctree-l2"><a class="reference external" href="test-plugins.html#loading-plugins-and-specifying-dependencies">1.3.2. Loading plugins and specifying dependencies</a></li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference external" href="test-ext.html">1.4. Writing plugins</a><ul>
|
|
<li class="toctree-l2"><a class="reference external" href="test-ext.html#learning-by-examples">1.4.1. Learning by examples</a></li>
|
|
<li class="toctree-l2"><a class="reference external" href="test-ext.html#setting-default-values-for-test-options">1.4.2. Setting default values for test options</a></li>
|
|
<li class="toctree-l2"><a class="reference external" href="test-ext.html#plugin-methods">1.4.3. Plugin methods</a></li>
|
|
<li class="toctree-l2"><a class="reference external" href="test-ext.html#pytest-events">1.4.4. Pytest Events</a></li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference external" href="test-dist.html">1.5. Distributed testing</a><ul>
|
|
<li class="toctree-l2"><a class="reference external" href="test-dist.html#speed-up-test-runs-by-sending-tests-to-multiple-cpus">1.5.1. Speed up test runs by sending tests to multiple CPUs</a></li>
|
|
<li class="toctree-l2"><a class="reference external" href="test-dist.html#running-tests-in-a-python-subprocess">1.5.2. Running tests in a Python subprocess</a></li>
|
|
<li class="toctree-l2"><a class="reference external" href="test-dist.html#sending-tests-to-remote-ssh-accounts">1.5.3. Sending tests to remote SSH accounts</a></li>
|
|
<li class="toctree-l2"><a class="reference external" href="test-dist.html#sending-tests-to-remote-socket-servers">1.5.4. Sending tests to remote Socket Servers</a></li>
|
|
<li class="toctree-l2"><a class="reference external" href="test-dist.html#running-tests-on-many-platforms-at-once">1.5.5. Running tests on many platforms at once</a></li>
|
|
<li class="toctree-l2"><a class="reference external" href="test-dist.html#specifying-test-exec-environments-in-a-conftest-py">1.5.6. Specifying test exec environments in a conftest.py</a></li>
|
|
<li class="toctree-l2"><a class="reference external" href="test-dist.html#specifying-rsync-dirs-in-a-conftest-py">1.5.7. Specifying “rsync” dirs in a conftest.py</a></li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference external" href="test-config.html">1.6. Test configuration</a><ul>
|
|
<li class="toctree-l2"><a class="reference external" href="test-config.html#test-options-and-values">1.6.1. test options and values</a></li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference external" href="test-examples.html">1.7. Working Examples</a><ul>
|
|
<li class="toctree-l2"><a class="reference external" href="test-examples.html#managing-state-at-module-class-and-method-level">1.7.1. managing state at module, class and method level</a></li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference external" href="impl-test.html">1.8. Implementation and Customization of <tt class="docutils literal"><span class="pre">py.test</span></tt></a><ul>
|
|
<li class="toctree-l2"><a class="reference external" href="impl-test.html#collecting-and-running-tests-implementation-remarks">1.8.1. Collecting and running tests / implementation remarks</a></li>
|
|
<li class="toctree-l2"><a class="reference external" href="impl-test.html#customizing-the-testing-process">1.8.2. Customizing the testing process</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sphinxsidebar">
|
|
<div class="sphinxsidebarwrapper">
|
|
<h4>Previous topic</h4>
|
|
<p class="topless"><a href="index.html"
|
|
title="previous chapter">py lib: Main tools and APIs</a></p>
|
|
<h4>Next topic</h4>
|
|
<p class="topless"><a href="test-quickstart.html"
|
|
title="next chapter">1.1. Quickstart</a></p>
|
|
<h3>This Page</h3>
|
|
<ul class="this-page-menu">
|
|
<li><a href="_sources/test.txt"
|
|
rel="nofollow">Show Source</a></li>
|
|
</ul>
|
|
<div id="searchbox" style="display: none">
|
|
<h3>Quick search</h3>
|
|
<form class="search" action="search.html" method="get">
|
|
<input type="text" name="q" size="18" />
|
|
<input type="submit" value="Go" />
|
|
<input type="hidden" name="check_keywords" value="yes" />
|
|
<input type="hidden" name="area" value="default" />
|
|
</form>
|
|
<p class="searchtip" style="font-size: 90%">
|
|
Enter search terms or a module, class or function name.
|
|
</p>
|
|
</div>
|
|
<script type="text/javascript">$('#searchbox').show(0);</script>
|
|
</div>
|
|
</div>
|
|
<div class="clearer"></div>
|
|
</div>
|
|
<div class="related">
|
|
<h3>Navigation</h3>
|
|
<ul>
|
|
<li class="right" style="margin-right: 10px">
|
|
<a href="genindex.html" title="General Index"
|
|
>index</a></li>
|
|
<li class="right" >
|
|
<a href="test-quickstart.html" title="1.1. Quickstart"
|
|
>next</a> |</li>
|
|
<li class="right" >
|
|
<a href="index.html" title="py lib: Main tools and APIs"
|
|
>previous</a> |</li>
|
|
<li><a href="index.html">py lib v1.0.0b1 documentation</a> »</li>
|
|
</ul>
|
|
</div>
|
|
<div class="footer">
|
|
© Copyright 2009, Holger Krekel.
|
|
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.7.
|
|
</div>
|
|
</body>
|
|
</html> |