<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 30 August 2013 17:40, Matt Davis <span dir="ltr"><<a href="mailto:jiffyclub@gmail.com" target="_blank">jiffyclub@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>I'm not at all familiar with IPython's tests so this may be of no value whatever to you, but I find pytest's parametrization features pretty simple and easy to use: <a href="http://pytest.org/latest/parametrize.html" target="_blank">http://pytest.org/latest/parametrize.html</a>. Something like that may allow you to keep the benefits of parametrized tests (less code duplication) without the pain of your custom setup.</div>

</blockquote></div><br></div><div class="gmail_extra">I think part of the issue is that we don't use the term 'parametric tests' properly. The logical meaning is "a test which accepts parameters, and can be run multiple times with different parameters". That's simple to implement, and both py.test and nose have ways of doing that. py.test's API is interesting, so thanks for pointing that out.<br>

<br>In IPython's case, a parametric test means "a test which is a generator, and we count each time it yields as a separate result". The only benefit of this is psychological: you can quickly increase the number of tests by writing tests with yields sprinkled in, without any other changes to the test function, and without testing any more code.<br>

<br></div><div class="gmail_extra">Thomas<br></div></div>