<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 18, 2016 at 5:45 AM, Luca Delucchi <span dir="ltr"><<a href="mailto:lucadeluge@gmail.com" target="_blank">lucadeluge@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 id=":1ac" class="" style="overflow:hidden">I think this annoing problem (to use again GRASS I have to exit and<br>
start GRASS) appear because in the setUpClass function a new mapset is<br>
created and used but in tearDownClass function the old mapset isn't<br>
set back and the new mapset is removed.<br>
<br>
I tried to fix this problem but I'm not able to store the old mapset<br>
somewhere and use it in the tearDownClass (self doesn't work because<br>
@classmethod decorator). Do you have any idea to solve this?</div></blockquote></div><br></div><div class="gmail_extra">The classmethods don't have self but they have cls. These are the variables you can set in the body of the class, e.g. mapsets_to_remove in the test_distr_tgis_db_raster3d.py test [1]. You can assign the value in the setUpClass method and use it in tearDownClass through the cls reference, e.g. cls.mapsets_to_remove.append(mapset_name).<br></div><div class="gmail_extra"><br>[1] <a href="https://trac.osgeo.org/grass/browser/grass/trunk/temporal/t.connect/testsuite/test_distr_tgis_db_raster3d.py?rev=67878#L19">https://trac.osgeo.org/grass/browser/grass/trunk/temporal/t.connect/testsuite/test_distr_tgis_db_raster3d.py?rev=67878#L19</a><br></div></div>