<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 22, 2018 at 5:36 AM, Nikos Alexandris <span dir="ltr"><<a href="mailto:nik@nikosalexandris.net" target="_blank">nik@nikosalexandris.net</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"><br>
rescale_output = g.read_command('r.rescale', overwrite=True, verbose=True,<br>
input=band, output=output_map_name, to=to_range)<br>
print rescale_output<br>
<br>
cls.runModule('r.rescale', overwrite=True, verbose=True,<br>
input=band, output=output_map_name, to=to_range)<br>
```<br>
<br>
the former will print the output of `r.rescale`, the latter will not.<br>
<br>
<br>
Is there a way to get the output of `runModule`, while building a test suite?<br></blockquote><div><br></div><div>It's a PyGRASS module, so just access `module.outputs.stdout` afterwards. Please extend the documentation if needed.<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">
Is the purpose of `expecting_stdout=False` in `runModule()` to test if a<br>
module emits something to stdout? [0]<br></blockquote><div><br></div></div>Yes. It's for cases like when r.univar prints nothing when raster map contains NULLs only (or region is outside its extent).<br><br></div><div class="gmail_extra">HTH,<br></div><div class="gmail_extra">Vaclav<br></div></div>