[yt-dev] Unit testing PRs

Matthew Turk matthewturk at gmail.com
Thu Oct 11 21:08:11 PDT 2012


On Thu, Oct 11, 2012 at 8:44 PM, Anthony Scopatz <scopatz at gmail.com> wrote:
> On Thu, Oct 11, 2012 at 6:29 PM, Matthew Turk <matthewturk at gmail.com> wrote:
>>
>> Hi all,
>>
>> As I noted in the other thread, Stephen issued a PR for unit testing
>> the kD-tree:
>>
>> https://bitbucket.org/yt_analysis/yt/pull-request/296/kd-trees-tests/diff
>>
>> I've just issued one for the profiles:
>>
>>
>> https://bitbucket.org/yt_analysis/yt/pull-request/297/tests-for-profiles/diff
>>
>> I think that once these get reviewed and accepte,d they can be used as
>> examples for how to move forward.  Mine also uses fake random data in
>> a parameter file, which I think can be useful for testing other
>> functionality as well.  Anthony, do these match up with what you were
>> thinking of for testing?  (Feel free to comment in the PR itself.)
>
>
> Yes, I think that these look good subject to my comments in the PRs
> themselves.  I like what you did with the test generators in particular ;)

Thanks.  :)  I've gone ahead and updated them to include your
comments, and also some covering grid tests.  I am pleased with where
they're at now -- I'm inclined to say that they cover a lot of good
ground in yt.  I think I'm getting the hang of unit (instead of just
answer) testing.

https://bitbucket.org/yt_analysis/yt/pull-request/297/tests-for-profiles/diff

I think that the testing initiative we've talked about is going to
come together.  For anybody else interested in helping out with
testing, do these tests make sense?  Have you been able to run them on
your machine?  You should be able to grab and go with:

nosetests -w yt -v -e "answer_testing" -e "kdtree"

from the main yt directory.  You need nose installed, but it's pip-installable.

-Matt

>
> Be Well
> Anthony
>
>>
>>
>> -Matt
>> _______________________________________________
>> yt-dev mailing list
>> yt-dev at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>
>
>
> _______________________________________________
> yt-dev mailing list
> yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>



More information about the yt-dev mailing list