[Neuroimaging] advice on choosing a testing library
Shoshana Berleant
berleant at stanford.edu
Fri Jun 17 14:46:43 EDT 2016
It looks like pytest can run our existing test with minimal changes, too,
which is a big plus: https://pytest.org/latest/nose.html
On Fri, Jun 17, 2016 at 9:55 AM Nate Vack <njvack at wisc.edu> wrote:
> I actually like pytest largely because it's so similar to unittest;
> however, on test errors it does a bunch of nice magic introspection to show
> me what's amiss. unittest is also good.
>
> I've also made use of the pytest's test parametrize decorator to test
> reading a whole heaping ton of file versions with one method, though
> there's an element of "this is dark magic and I kind of feel like maybe I
> should write tests to test my tests." In the end, it saved me a ton of code
> so I held my nose and did it; here's the example:
>
> https://github.com/njvack/bioread/blob/master/test/test_reader.py#L80
>
> -n
>
> On Fri, Jun 17, 2016 at 11:23 AM Satrajit Ghosh <satra at mit.edu> wrote:
>
>> thank you folks.
>>
>> is there a particular reason why the standard python unittest library is
>> not being used? it seems from the documentation that the two are quite
>> similar.
>>
>> https://docs.python.org/dev/library/unittest.html#basic-example
>>
>> if everyone is using py.test now, we can start moving towards it.
>>
>> cheers,
>>
>> satra
>>
>> On Fri, Jun 17, 2016 at 10:27 AM, Nate Vack <njvack at wisc.edu> wrote:
>>
>>> +1 to pytest.
>>>
>>> -n
>>>
>>> On Fri, Jun 17, 2016 at 9:25 AM Nathaniel Smith <njs at pobox.com> wrote:
>>>
>>>> AFAICT, literally everyone uses pytest, so that's what I've been moving
>>>> to. It's fine.
>>>> On Jun 17, 2016 06:35, "Satrajit Ghosh" <satra at mit.edu> wrote:
>>>>
>>>> hi folks,
>>>>
>>>> in nipype and other nipy projects we have used nose forever, but as
>>>> matthew noted, nose will likely not be maintained in the future. python now
>>>> has a unittest framework built into the standard library, and a large
>>>> number of other testing frameworks.
>>>>
>>>> https://wiki.python.org/moin/PythonTestingToolsTaxonomy
>>>>
>>>> are there suggestions on how one might make the decision on which
>>>> framework to choose?
>>>>
>>>> cheers,
>>>>
>>>> satra
>>>>
>>>>
>>>> _______________________________________________
>>>> Neuroimaging mailing list
>>>> Neuroimaging at python.org
>>>> https://mail.python.org/mailman/listinfo/neuroimaging
>>>>
>>>> _______________________________________________
>>>> Neuroimaging mailing list
>>>> Neuroimaging at python.org
>>>> https://mail.python.org/mailman/listinfo/neuroimaging
>>>>
>>>
>>> _______________________________________________
>>> Neuroimaging mailing list
>>> Neuroimaging at python.org
>>> https://mail.python.org/mailman/listinfo/neuroimaging
>>>
>>>
>> _______________________________________________
>> Neuroimaging mailing list
>> Neuroimaging at python.org
>> https://mail.python.org/mailman/listinfo/neuroimaging
>>
> _______________________________________________
> Neuroimaging mailing list
> Neuroimaging at python.org
> https://mail.python.org/mailman/listinfo/neuroimaging
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20160617/c62b7895/attachment.html>
More information about the Neuroimaging
mailing list