<story><title>Pytest 3.2.0 released</title><url>https://docs.pytest.org/en/latest/changelog.html#pytest-3-2-0-2017-07-30</url></story><parent_chain><item><author>giancarlostoro</author><text>I&amp;#x27;m fairly new to Python and wondering of any reasons to use these as opposed to the standard unittest package that comes with Python?</text></item></parent_chain><comment><author>masklinn</author><text>It has an excellent runner and makes much better use of Python features:&lt;p&gt;* you can define tests as free functions (you don&amp;#x27;t have to, it also supports classes and even regular unittest cases, you can use pytest to run your existing suite)&lt;p&gt;* exceptions aside it uses the standard `assert` statement&lt;p&gt;* fixtures are DI&amp;#x27;d, independent from tests and much more flexible than the setUp&amp;#x2F;tearDown dance&lt;p&gt;* tests are configured and fixtures are defined using decorators &amp;amp; generators&lt;p&gt;* excellent support for data-driven tests (parametrized tests and fixtures)&lt;p&gt;* there is a wealth of reusable third-party plugins[0] ranging from framework helpers[1] to test parallelisation and distribution[2]&lt;p&gt;[0] &lt;a href=&quot;http:&amp;#x2F;&amp;#x2F;plugincompat.herokuapp.com&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;plugincompat.herokuapp.com&lt;/a&gt;&lt;p&gt;[1] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;pypi.python.org&amp;#x2F;pypi&amp;#x2F;pytest-tornado&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;pypi.python.org&amp;#x2F;pypi&amp;#x2F;pytest-tornado&lt;/a&gt;&lt;p&gt;[2] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;pypi.python.org&amp;#x2F;pypi&amp;#x2F;pytest-xdist&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;pypi.python.org&amp;#x2F;pypi&amp;#x2F;pytest-xdist&lt;/a&gt;</text></comment>
<story><title>Pytest 3.2.0 released</title><url>https://docs.pytest.org/en/latest/changelog.html#pytest-3-2-0-2017-07-30</url></story><parent_chain><item><author>giancarlostoro</author><text>I&amp;#x27;m fairly new to Python and wondering of any reasons to use these as opposed to the standard unittest package that comes with Python?</text></item></parent_chain><comment><author>mivade</author><text>If for no other reason, pytest requires a lot less boilerplate.&lt;p&gt;Pytest fixtures are also quite a bit more flexible than unittest&amp;#x27;s setUp and tearDown methods, although they take a little while to really understand (at least they did for me) since they use some magic.</text></comment>