137 lines
5.9 KiB
HTML
137 lines
5.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.6. Test configuration — 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="up" title="1. py.test" href="test.html" />
|
|
<link rel="next" title="1.7. Working Examples" href="test-examples.html" />
|
|
<link rel="prev" title="1.5. Distributed testing" href="test-dist.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-examples.html" title="1.7. Working Examples"
|
|
accesskey="N">next</a> |</li>
|
|
<li class="right" >
|
|
<a href="test-dist.html" title="1.5. Distributed testing"
|
|
accesskey="P">previous</a> |</li>
|
|
<li><a href="index.html">py lib v1.0.0b1 documentation</a> »</li>
|
|
<li><a href="contents.html" >Contents</a> »</li>
|
|
<li><a href="test.html" accesskey="U">1. py.test</a> »</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="document">
|
|
<div class="documentwrapper">
|
|
<div class="bodywrapper">
|
|
<div class="body">
|
|
|
|
<div class="section" id="test-configuration">
|
|
<h1>1.6. Test configuration<a class="headerlink" href="#test-configuration" title="Permalink to this headline">¶</a></h1>
|
|
<div class="section" id="test-options-and-values">
|
|
<h2>1.6.1. test options and values<a class="headerlink" href="#test-options-and-values" title="Permalink to this headline">¶</a></h2>
|
|
<p>You can see all available command line options by running:</p>
|
|
<div class="highlight-python"><div class="highlight"><pre><span class="n">py</span><span class="o">.</span><span class="n">test</span> <span class="o">-</span><span class="n">h</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>py.test will lookup values of options in this order:</p>
|
|
<ul class="simple">
|
|
<li>option value supplied at command line</li>
|
|
<li>content of environment variable <tt class="docutils literal"><span class="pre">PYTEST_OPTION_NAME=...</span></tt></li>
|
|
<li><tt class="docutils literal"><span class="pre">name</span> <span class="pre">=</span> <span class="pre">...</span></tt> setting in the nearest <tt class="docutils literal"><span class="pre">conftest.py</span></tt> file.</li>
|
|
</ul>
|
|
<p>The name of an option usually is the one you find
|
|
in the longform of the option, i.e. the name
|
|
behind the <tt class="docutils literal"><span class="pre">--</span></tt> double-dash.</p>
|
|
<p>IOW, you can set default values for options per project, per
|
|
home-directoray, per shell session or per test-run.</p>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sphinxsidebar">
|
|
<div class="sphinxsidebarwrapper">
|
|
<h3><a href="index.html">Table Of Contents</a></h3>
|
|
<ul>
|
|
<li><a class="reference external" href="">1.6. Test configuration</a><ul>
|
|
<li><a class="reference external" href="#test-options-and-values">1.6.1. test options and values</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
<h4>Previous topic</h4>
|
|
<p class="topless"><a href="test-dist.html"
|
|
title="previous chapter">1.5. Distributed testing</a></p>
|
|
<h4>Next topic</h4>
|
|
<p class="topless"><a href="test-examples.html"
|
|
title="next chapter">1.7. Working Examples</a></p>
|
|
<h3>This Page</h3>
|
|
<ul class="this-page-menu">
|
|
<li><a href="_sources/test-config.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-examples.html" title="1.7. Working Examples"
|
|
>next</a> |</li>
|
|
<li class="right" >
|
|
<a href="test-dist.html" title="1.5. Distributed testing"
|
|
>previous</a> |</li>
|
|
<li><a href="index.html">py lib v1.0.0b1 documentation</a> »</li>
|
|
<li><a href="contents.html" >Contents</a> »</li>
|
|
<li><a href="test.html" >1. py.test</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> |