Current File : //usr/share/doc/pytest-2.7.0/html/en/announce/release-2.7.0.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>pytest-2.7.0: fixes, features, speed improvements</title>
<link rel="stylesheet" href="../_static/flasky.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '2.7.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="shortcut icon" href="../_static/pytest1favi.ico"/>
<link rel="top" title="None" href="../index.html" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li><a href="../contents.html">pytest-2.7.0</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="pytest-2-7-0-fixes-features-speed-improvements">
<h1>pytest-2.7.0: fixes, features, speed improvements<a class="headerlink" href="#pytest-2-7-0-fixes-features-speed-improvements" title="Permalink to this headline">¶</a></h1>
<p>pytest is a mature Python testing tool with more than a 1100 tests
against itself, passing on many different interpreters and platforms.
This release is supposed to be drop-in compatible to 2.6.X.</p>
<p>See below for the changes and see docs at:</p>
<blockquote>
<div><a class="reference external" href="http://pytest.org">http://pytest.org</a></div></blockquote>
<p>As usual, you can upgrade from pypi via:</p>
<div class="highlight-python"><pre>pip install -U pytest</pre>
</div>
<p>Thanks to all who contributed, among them:</p>
<blockquote>
<div>Anatoly Bubenkoff
Floris Bruynooghe
Brianna Laugher
Eric Siegerman
Daniel Hahler
Charles Cloud
Tom Viner
Holger Peters
Ldiary Translations
almarklein</div></blockquote>
<p>have fun,
holger krekel</p>
<div class="section" id="compared-to-2-6-4">
<h2>2.7.0 (compared to 2.6.4)<a class="headerlink" href="#compared-to-2-6-4" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>fix issue435: make reload() work when assert rewriting is active.
Thanks Daniel Hahler.</li>
<li>fix issue616: conftest.py files and their contained fixutres are now
properly considered for visibility, independently from the exact
current working directory and test arguments that are used.
Many thanks to Eric Siegerman and his PR235 which contains
systematic tests for conftest visibility and now passes.
This change also introduces the concept of a <tt class="docutils literal"><span class="pre">rootdir</span></tt> which
is printed as a new pytest header and documented in the pytest
customize web page.</li>
<li>change reporting of “diverted” tests, i.e. tests that are collected
in one file but actually come from another (e.g. when tests in a test class
come from a base class in a different file). We now show the nodeid
and indicate via a postfix the other file.</li>
<li>add ability to set command line options by environment variable PYTEST_ADDOPTS.</li>
<li>added documentation on the new pytest-dev teams on bitbucket and
github. See <a class="reference external" href="https://pytest.org/latest/contributing.html">https://pytest.org/latest/contributing.html</a> .
Thanks to Anatoly for pushing and initial work on this.</li>
<li>fix issue650: new option <tt class="docutils literal"><span class="pre">--docttest-ignore-import-errors</span></tt> which
will turn import errors in doctests into skips. Thanks Charles Cloud
for the complete PR.</li>
<li>fix issue655: work around different ways that cause python2/3
to leak sys.exc_info into fixtures/tests causing failures in 3rd party code</li>
<li>fix issue615: assertion re-writing did not correctly escape % signs
when formatting boolean operations, which tripped over mixing
booleans with modulo operators. Thanks to Tom Viner for the report,
triaging and fix.</li>
<li>implement issue351: add ability to specify parametrize ids as a callable
to generate custom test ids. Thanks Brianna Laugher for the idea and
implementation.</li>
<li>introduce and document new hookwrapper mechanism useful for plugins
which want to wrap the execution of certain hooks for their purposes.
This supersedes the undocumented <tt class="docutils literal"><span class="pre">__multicall__</span></tt> protocol which
pytest itself and some external plugins use. Note that pytest-2.8
is scheduled to drop supporting the old <tt class="docutils literal"><span class="pre">__multicall__</span></tt>
and only support the hookwrapper protocol.</li>
<li>majorly speed up invocation of plugin hooks</li>
<li>use hookwrapper mechanism in builtin pytest plugins.</li>
<li>add a doctest ini option for doctest flags, thanks Holger Peters.</li>
<li>add note to docs that if you want to mark a parameter and the
parameter is a callable, you also need to pass in a reason to disambiguate
it from the “decorator” case. Thanks Tom Viner.</li>
<li>“python_classes” and “python_functions” options now support glob-patterns</li>
</ul>
<blockquote>
<div>for test discovery, as discussed in issue600. Thanks Ldiary Translations.</div></blockquote>
<ul class="simple">
<li>allow to override parametrized fixtures with non-parametrized ones and vice versa (bubenkoff).</li>
<li>fix issue463: raise specific error for ‘parameterize’ misspelling (pfctdayelise).</li>
<li>On failure, the <tt class="docutils literal"><span class="pre">sys.last_value</span></tt>, <tt class="docutils literal"><span class="pre">sys.last_type</span></tt> and
<tt class="docutils literal"><span class="pre">sys.last_traceback</span></tt> are set, so that a user can inspect the error
via postmortem debugging (almarklein).</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../contents.html">
<img class="logo" src="../_static/pytest1.png" alt="Logo"/>
</a></p><h3><a href="../contents.html">Table Of Contents</a></h3>
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="../contents.html">Contents</a></li>
<li><a href="../getting-started.html">Install</a></li>
<li><a href="../example/index.html">Examples</a></li>
<li><a href="../customize.html">Customize</a></li>
<li><a href="../contact.html">Contact</a></li>
<li><a href="../talks.html">Talks/Posts</a></li>
<li><a href="../changelog.html">Changelog</a></li>
</ul>
<hr>
<ul>
<li><a class="reference internal" href="#">pytest-2.7.0: fixes, features, speed improvements</a><ul>
<li><a class="reference internal" href="#compared-to-2-6-4">2.7.0 (compared to 2.6.4)</a></li>
</ul>
</li>
</ul>
<h3>Related Topics</h3>
<ul>
<li><a href="../contents.html">Documentation overview</a><ul>
</ul></li>
</ul><h3>Useful Links</h3>
<ul>
<li><a href="../index.html">The pytest Website</a></li>
<li><a href="../contributing.html">Contribution Guide</a></li>
<li><a href="https://pypi.python.org/pypi/pytest">pytest @ PyPI</a></li>
<li><a href="https://bitbucket.org/pytest-dev/pytest/">pytest @ Bitbucket</a></li>
<li><a href="http://pytest.org/latest/plugins_index/index.html">3rd party plugins</a></li>
<li><a href="https://bitbucket.org/pytest-dev/pytest/issues?status=new&status=open">Issue Tracker</a></li>
<li><a href="http://pytest.org/latest/pytest.pdf">PDF Documentation</a>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" />
<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="footer">
© Copyright 2014, holger krekel.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
</div>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-7597274-13']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>