<div dir="ltr"><p class="">Hey folks,</p>

<p class="">  I spent some time evaluating testing tools for Python with a focus on py.test and nose.  My notes below are cursory, and may be informative for your purposes:</p>

<p class="" style="margin-left:0.5in"><span style="color:rgb(38,38,38)">py.test</span></p>

<p class="" style="margin-left:0.5in"><span style="color:rgb(64,64,64)">               
parallelizable: threading + SMP support [3][4]</span></p>

<p class="" style="margin-left:0.5in"><span style="color:rgb(64,64,64)">               
better documentation: [1][3]</span></p>

<p class="" style="margin-left:0.5in"><span style="color:rgb(64,64,64)">               
can generate script that does all py.test functions, obviating the need to
distribute py.test [1][10]</span></p>

<p class="" style="margin-left:0.5in"><span style="color:rgb(64,64,64)">                               
integrate tests into your distribution (py.test --genscript=runtests.py), to
create a standalone version of py.test [10]</span></p>

<p class="" style="margin-left:0.5in"><span style="color:rgb(64,64,64)">               
can run nose, unittest, doctest style tests [1][2]</span></p>

<p class="" style="margin-left:0.5in"><span style="color:rgb(64,64,64)">               
test detection via globs, configurable [3]</span></p>

<p class="" style="margin-left:0.5in"><span style="color:rgb(64,64,64)">               
test failure output more discernible than nose [3][9]</span></p>

<p class="" style="margin-left:0.5in"><span style="color:rgb(64,64,64)">               
easier, more flexible assertions than nose [8]</span></p>

<p class="" style="margin-left:0.5in"><span style="color:rgb(64,64,64)">               
setup speed is sub-second different from nose, also test speeds can be managed
via distribution (threads + SMP via xdist) [9][11]</span></p>

<p class="" style="margin-left:0.5in"><span style="color:rgb(64,64,64)">               
provides test isolation, if needed [9]</span></p>

<p class="" style="margin-left:0.5in"><span style="color:rgb(64,64,64)">               
dependency injection via funcargs [10][12][13]</span></p>

<p class="" style="margin-left:0.5in"><span style="color:rgb(64,64,64)">               
coverage plugin [11]</span></p>

<p class="" style="margin-left:0.5in"> </p>

<p class="" style="margin-left:0.5in"><span style="color:rgb(38,38,38)">nose</span></p>

<p class="" style="margin-left:0.5in"><span style="color:rgb(38,38,38)">               
documentation concerns, this may be outdated [3]</span></p>

<p class="" style="margin-left:0.5in"><span style="color:rgb(38,38,38)">               
parallelization issues [3][8]</span></p>

<p class="" style="margin-left:0.5in"><span style="color:rgb(38,38,38)">               
slightly faster than py.test [4][11]</span></p>

<p class="" style="margin-left:0.5in"><span style="color:rgb(38,38,38)">               
test detection via regex (setup in cmdline or config file) [3]</span></p>

<p class="" style="margin-left:0.5in"><span style="color:rgb(38,38,38)">               
can run unittest, doctest style tests [1][2]</span></p>

<p class="" style="margin-left:0.5in"><span style="color:rgb(38,38,38)">               
cannot run py.test style tests [1]</span></p>

<p class=""> </p>

<p class=""><b>Conclusions</b>:</p>

<p class="" style><span style="font-family:Symbol">·<span style="font-size:7pt;font-family:&#39;Times New Roman&#39;">        
</span></span>test formats are so similar, that nose or
py.text can be used without much consequence until you&#39;re writing more exotic
tests (you could swap with little consequence)</p>

<p class="" style><span style="font-family:Symbol">·<span style="font-size:7pt;font-family:&#39;Times New Roman&#39;">        
</span></span>nose is sub-second faster than py.test in
execution time; this is typically unimportant</p>

<p class="" style><span style="font-family:Symbol">·<span style="font-size:7pt;font-family:&#39;Times New Roman&#39;">        
</span></span>community seems to slightly favor py.test</p>

<p class=""> </p>

<p class=""><b>References</b>:</p>

<p class="">[1] <a href="http://mail.scipy.org/pipermail/astropy/2011-July/001673.html">http://mail.scipy.org/pipermail/astropy/2011-July/001673.html</a>
</p>

<p class=""> [2] <a href="http://pytest.org/latest/nose.html">http://pytest.org/latest/nose.html</a>
</p>

<p class=""> [3] <a href="http://fedoraproject.org/wiki/User:Tflink/AutoQA_nose_pytest_comparison">http://fedoraproject.org/wiki/User:Tflink/AutoQA_nose_pytest_comparison</a>
</p>

<p class=""> [4] <a href="http://www.libcrack.so/2012/01/09/a-brief-analysis-of-python-testing-software/">http://www.libcrack.so/2012/01/09/a-brief-analysis-of-python-testing-software/</a>
</p>

<p class=""> [5] <a href="http://pythontesting.net/framework/nose/nose-introduction/">http://pythontesting.net/framework/nose/nose-introduction/</a>
</p>

<p class=""> [6] <a href="http://wiki.python.org/moin/PythonTestingToolsTaxonomy">http://wiki.python.org/moin/PythonTestingToolsTaxonomy</a>
</p>

<p class=""> [7] <a href="http://docs.python-guide.org/en/latest/writing/tests.html#tools">http://docs.python-guide.org/en/latest/writing/tests.html#tools</a>
</p>

<p class=""> [8] <a href="http://stackoverflow.com/questions/191673/preferred-python-unit-testing-framework">http://stackoverflow.com/questions/191673/preferred-python-unit-testing-framework</a>
</p>

<p class=""> [9] <a href="http://thread.gmane.org/gmane.comp.python.testing.general/3748">http://thread.gmane.org/gmane.comp.python.testing.general/3748</a>
</p>

<p class=""> [10] <a href="http://article.gmane.org/gmane.comp.python.testing.general/3752">http://article.gmane.org/gmane.comp.python.testing.general/3752</a>
</p>

<p class=""> [11] <a href="http://article.gmane.org/gmane.comp.python.testing.general/3765">http://article.gmane.org/gmane.comp.python.testing.general/3765</a>
</p>

<p class=""> [12] <a href="http://pytest.org/latest/funcargs.html">http://pytest.org/latest/funcargs.html</a>
</p>

<p class=""> [13] <a href="http://holgerkrekel.net/2009/05/13/parametrizing-python-tests-generalized/">http://holgerkrekel.net/2009/05/13/parametrizing-python-tests-generalized/</a>
</p>

<p class=""> </p></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 13, 2013 at 6:28 AM, Emily Bache <span dir="ltr">&lt;<a href="mailto:emily.bache@cantab.net" target="_blank">emily.bache@cantab.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<br><br>I&#39;ve been looking at pytest and nose as alternatives to unittest, 
since they both offer a pythonic interface for writing unit tests 
without too much boilerplate. I was hoping for some opinions from this 
list about when to choose nose and when to choose pytest? What are the 
main advantages of each? My target python version is 3.3, does that make
 a difference? <br>
<br>Regards,<br>Emily Bache</div>
<br>_______________________________________________<br>
testing-in-python mailing list<br>
<a href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a><br>
<a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
<br></blockquote></div><br></div>