[Thuban-list] tests for Daniel Cavelo's classifiers
Moritz Lennert
mlennert at club.worldonline.be
Sun Jan 23 11:13:17 CET 2005
On Thu, January 20, 2005 21:48, Bernhard Reiter said:
> Hi Moritz,
>
> On Tue, Jan 18, 2005 at 10:19:24AM +0100, Moritz Lennert wrote:
>> > So first step would be to apply the patch for HEAD.
>>
>> Attached is a version of the patches that applies cleanly to current
>> (20050118
>> at ca. 1am) CVS HEAD, plus the necessary additional files that can just be
>> dropped in. This version of the patch also includes two bug fixes, one to
>> the
>> discont algorithm and one general one, dealing with no data situations.
>
> I take it the fixes are for the new code itself,
> otherwise you could extract them into smaller patches.
> BTW: the -N switch to diff should even give you diffs of the new files,
> which might be easier to packages.
Yes, the fixes (by Daniel) are for the new code itself.
>> > Next, one should think about what are the most important tests
>> > and add them to the directory test/
>> > There you can see how the other tests are made - not too difficult in
>> > practice but some brain work to have them useful.
>> > test_color.py is a simple one to get the idea.
>>
>> I haven't had time to look into this in great detail (and won't have in the
>> near future), so if someone else has the opportunity to do so, that would be
>> great. (I guess I'll also have to read
>> http://diveintopython.org/unit_testing/index.html in order to completely
>> understand the testing business.)
>
> No, it is quite easy: Just copy an appropriate test and start adding
> one function for each method that is new in the patch.
The main question I had was: should the tests only test for internal
consistency of the code, or should they also check whether the algorithm works
correctly, i.e. in this case whether the partition that is proposed actually
is correct. The latter would then require quite a series of test cases, or ?
>
>> I would really appreciate if this patch could be integrated into cvs as that
>> would make it possible to install with debian apt-get and have everything
>> integrated...
>
> What we also would like to have would be a Changelog entry.
> It makes it easer to understand what is going on from an overview
> point of view.
Daniel, do you think you could do this. Or would the original mail describing
the patch
(http://intevation.de/pipermail/thuban-list/2004-February/000348.html) be more
or less enough ?
Moritz
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)