<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 31, 2014 at 4:41 AM, Pietro <span dir="ltr"><<a href="mailto:peter.zamb@gmail.com" target="_blank">peter.zamb@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Vaclav,<br>
<div class="im"><br>
On Fri, Jan 31, 2014 at 3:53 AM, Vaclav Petras <<a href="mailto:wenzeslaus@gmail.com">wenzeslaus@gmail.com</a>> wrote:<br>
> Sören suggested that he would be my mentor in case my application is<br>
> successful.<br>
<br>
</div>If possible, I would like to help on this task too.<br>
<br>
I've used doctest to cover some of the pygrass' functions and modules,<br>
but I don't like too much, at the moment to test the pygrass' doctest<br>
you have to be inside the NorthCarolina/user1 location/mapset, that is<br>
not always practical.<br></blockquote><div><br></div><div>On the other hand, my impression from writing tests was that sometimes it would be advantageous</div><div>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.</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Would be nice to have something that run independently from the<br>
location/mapset. 'm studying the unittest framework and in a short<br>
time I would like to start to write some unittest for the pygrass<br>
library.<br></blockquote><div><br></div><div>unittest test which does not rely on location/mapset is probably the default and preferred way, so I'm looking forward to see this.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Therefore I'm definitely interested on this topic.<br>
<div class="im"><br>
> For example, it seems that doctest is very convenient for modules which has<br>
> standard input and output (see recent doctest for r.category module).<br>
<br>
</div>I really like it, and they can also help users to move they bash<br>
scripts to python.<br>
<br></blockquote><div>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.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
All the best.<br>
<span class="HOEnZb"><font color="#888888"><br>
Pietro<br>
</font></span></blockquote></div><br></div></div>