<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 30, 2015 at 3:27 AM, Jachym Cepicky <span dir="ltr"><<a href="mailto:jachym.cepicky@gmail.com" target="_blank">jachym.cepicky@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>about the tests - generally yes, I'm writing it. Are you referring to <a href="http://r3.info" target="_blank">r3.info</a> or to g.search.* modules?  I could not found any example to <a href="http://r3.info" target="_blank">r3.info</a> tests</div></blockquote><div><br></div><div>I meant <a href="http://r3.info">r3.info</a> as it is more critical but g.search.* is similar just not critical.<br></div><div><br><a href="https://grass.osgeo.org/grass71/manuals/libpython/gunittest_testing.html#tests-of-grass-modules">https://grass.osgeo.org/grass71/manuals/libpython/gunittest_testing.html#tests-of-grass-modules</a><br><a href="https://trac.osgeo.org/grass/browser/grass/trunk/raster/r.mapcalc/testsuite/test_r_mapcalc.py#L80">https://trac.osgeo.org/grass/browser/grass/trunk/raster/r.mapcalc/testsuite/test_r_mapcalc.py#L80</a><br><a href="https://trac.osgeo.org/grass/browser/grass/trunk/lib/python/gunittest/testsuite/test_assertions.py">https://trac.osgeo.org/grass/browser/grass/trunk/lib/python/gunittest/testsuite/test_assertions.py</a><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br></div><div>I've rewritten <a href="http://r3.info" target="_blank">r3.info</a> so that the code is the same, as <a href="http://r.info" target="_blank">r.info</a> (with -e flag) - but I can not tell, I'm satisfied with the result</div></blockquote><div><br></div><div>I also cannot tell.<br><br><a href="https://trac.osgeo.org/grass/changeset/66983">https://trac.osgeo.org/grass/changeset/66983</a><br><a href="https://trac.osgeo.org/grass/changeset/66984">https://trac.osgeo.org/grass/changeset/66984</a><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>(there are line breaks and quotes in the strings, what IMHO is really not good)<br></div></blockquote><div><br></div><div>The comments, history or whatever it is is written as shell command for r and r3, so the strings are in quotes (to be general) and long lines are broken and continuation is done by backslash. With <a href="http://r3.info">r3.info</a> I now get:<br></div><div><br>comments="r3.flow input="test1" flowaccumulation="test2" unit="cell" step=0.25\ limit=2000 max_error=1e-5 direction="down""<br><br></div><div>I'm not sure how exactly this compares to <a href="http://r.info">r.info</a>. Vectors have this in some better way but it's part of the format and I'm not familiar with it.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div></div><div><br></div><div>My time resources allocatable to this task are slowly reaching to their end. I would need clear decision from you guys (since you are in charge to mess around GRASS code base):</div><div><br></div><div>Where to put print_output & supporting functions?</div></blockquote><div><br>print_output can go to lib/python/script/utils.py (grass.script.utils). The others probably too, although I would mark them as experimental (not guaranteed API).<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Where to write tests for them?</div></blockquote><div><br></div><div>In a file in the testsuite directory at the level of the tested file, i.e. lib/python/script/testsuite for lib/python/script/utils.py.<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>(I assume standard unittest package is being used)</div></blockquote><div><br></div><div>unittest and grass.gnunittest, please see<br><br><a href="https://grass.osgeo.org/grass71/manuals/libpython/gunittest_testing.html">https://grass.osgeo.org/grass71/manuals/libpython/gunittest_testing.html</a><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Can I omit g.search.data for now? (I would like to put some better code structure, as I can see it more clear now) - so I would put only g.search.module for now to GRASS trunk?</div><div></div></blockquote></div><br></div><div class="gmail_extra">Sure.<br><br></div><div class="gmail_extra">Thanks! I'm looking forward to it.<br></div></div>