[GRASS-dev] GSoC idea: Testing framework

Vaclav Petras wenzeslaus at gmail.com
Fri Jan 31 07:53:04 PST 2014


On Fri, Jan 31, 2014 at 4:41 AM, Pietro <peter.zamb at gmail.com> wrote:

> Hi Vaclav,
>
> On Fri, Jan 31, 2014 at 3:53 AM, Vaclav Petras <wenzeslaus at gmail.com>
> wrote:
> > Sören suggested that he would be my mentor in case my application is
> > successful.
>
> If possible, I would like to help on this task too.
>
> I've used doctest to cover some of the pygrass' functions and modules,
> but I don't like too much, at the moment to test the pygrass' doctest
> you have to be inside the NorthCarolina/user1 location/mapset, that is
> not always practical.
>

On the other hand, my impression from writing tests was that sometimes it
would be advantageous
to have some prepared location with everything, so I would like to go in
the way of supporting different locations rather then requiring all tests
to use only data their generate in the preparation phase.

Would be nice to have something that run independently from the
> location/mapset. 'm studying the unittest framework and in a short
> time I would like to start to write some unittest for the pygrass
> library.
>

unittest test which does not rely on location/mapset is probably the
default and preferred way, so I'm looking forward to see this.


> Therefore I'm definitely interested on this topic.
>
> > For example, it seems that doctest is very convenient for modules which
> has
> > standard input and output (see recent doctest for r.category module).
>
> I really like it, and they can also help users to move they bash
> scripts to python.
>
> I used doctest in this way for the first time but it seems that it is as
easy as writing bash script and you get doctest functionality and Python
functionality to examine your results. The testing framework (perhaps
unittest class inside some script) would run the doctest file in the right
environment (location) or in several environments if desired.


> All the best.
>
> Pietro
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20140131/6bce8436/attachment-0001.html>


More information about the grass-dev mailing list