Hi Terri,

I tried to send the message below a few days ago but I don’t think it delivered 
in the end; so I am trying again here.

I have some slides available [1], which may give a useful introduction (see 
slides 16 to 58 approximately) - it’s mostly generic and then very specific for 
Python and py.test, and some of it complements the advice from Titus. It was 
used as teaching material for Masters and PhD students without a computer 
science background but an interest in computational science. Slide 56 gives 
some suggestions on what tests you could have.

Best wishes,

Hans


[1] 
http://www.southampton.ac.uk/~fangohr/training/Software-Engineering-for-Computational-Science-and-Engineering-Hans-Fangohr.pdf
 
<http://www.southampton.ac.uk/~fangohr/training/Software-Engineering-for-Computational-Science-and-Engineering-Hans-Fangohr.pdf>




> On 17 Jul 2017, at 16:50, Terri Yu <[email protected]> wrote:
> 
> Thanks everyone, those are interesting resources for testing in general.
> 
> I'm using Python's unittest framework and everything is already set up.  The 
> specific problem I need help with is what tests to write, in order to test 
> numerical floating point output from algorithms.  Given the responses I've 
> gotten, it seems like not many people write their own algorithms and/or test 
> them.
> 
> Terri
> 
> On Sun, Jul 16, 2017 at 5:50 PM, Jeremy Gray <[email protected] 
> <mailto:[email protected]>> wrote:
> Hi Terri,
> 
> 
> It might also be worth checking out the workshop from this years pycon from 
> Eria ma:
> Best Testing Practices for Data Science, on yotube here - 
> https://www.youtube.com/watch?v=yACtdj1_IxE 
> <https://www.youtube.com/watch?v=yACtdj1_IxE>
> 
> The github repo is here: 
> https://github.com/ericmjl/data-testing-tutorial 
> <https://github.com/ericmjl/data-testing-tutorial>
> 
> Cheers,
> Jeremy
> 
> On Fri, Jul 14, 2017 at 5:21 PM, Olav Vahtras <[email protected] 
> <mailto:[email protected]>> wrote:
> Dear Terri
> 
> In addition I can recommend the following resource:
> 
> pythontesting.net <http://pythontesting.net/> has a podcast series on testing 
> and more, check out the new book on pytest by the site maintainer Brian Okken
> 
> Regards
> Olav
> 
> 
> 
> Olav
> > 14 juli 2017 kl. 21:36 skrev Ashwin Srinath <[email protected] 
> > <mailto:[email protected]>>:
> >
> > If you're using Python, numpy.testing has the tools you'll need:
> >
> > https://docs.scipy.org/doc/numpy/reference/routines.testing.html 
> > <https://docs.scipy.org/doc/numpy/reference/routines.testing.html>
> >
> > There's also pandas.testing for testing code that uses Pandas.
> >
> > Thanks,
> > Ashwin
> >
> >> On Fri, Jul 14, 2017 at 3:27 PM, Terri Yu <[email protected] 
> >> <mailto:[email protected]>> wrote:
> >> Hi everyone,
> >>
> >> Are there any resources that explain how to write unit tests for scientific
> >> software?  I'm writing some software that processes audio signals and there
> >> are many parameters.  I'm wondering what's the best way to test floating
> >> point numeric results.
> >>
> >> Do I need to test every single parameter?  How can I verify accuracy of
> >> numeric results... use a different language / library?  I would like to do 
> >> a
> >> good job of testing, but I also don't want to write a bunch of semi-useless
> >> tests that take a long time to run.
> >>
> >> I would appreciate any thoughts you have.
> >>
> >> Thank you,
> >>
> >> Terri
> >>
> >> _______________________________________________
> >> Discuss mailing list
> >> [email protected] 
> >> <mailto:[email protected]>
> >> http://lists.software-carpentry.org/listinfo/discuss 
> >> <http://lists.software-carpentry.org/listinfo/discuss>
> > _______________________________________________
> > Discuss mailing list
> > [email protected] 
> > <mailto:[email protected]>
> > http://lists.software-carpentry.org/listinfo/discuss 
> > <http://lists.software-carpentry.org/listinfo/discuss>
> _______________________________________________
> Discuss mailing list
> [email protected] 
> <mailto:[email protected]>
> http://lists.software-carpentry.org/listinfo/discuss 
> <http://lists.software-carpentry.org/listinfo/discuss>
> 
> _______________________________________________
> Discuss mailing list
> [email protected]
> http://lists.software-carpentry.org/listinfo/discuss

_______________________________________________
Discuss mailing list
[email protected]
http://lists.software-carpentry.org/listinfo/discuss

Reply via email to