Hi devs,
I added some tests [0] on t.connect testsuite to test the new "output"
parameter in t.list, t.rast.list, t.vect.list, t.raster3d.list [1].
These tests return me (also before my changes) this error [2] if I run
one after other.
I think this annoing problem (to use again GRASS I have to exit and
start GRASS) appear because in the setUpClass function a new mapset is
created and used but in tearDownClass function the old mapset isn't
set back and the new mapset is removed.
I tried to fix this problem but I'm not able to store the old mapset
somewhere and use it in the tearDownClass (self doesn't work because
@classmethod decorator). Do you have any idea to solve this?
[0] https://trac.osgeo.org/grass/changeset/67878
[1] https://trac.osgeo.org/grass/ticket/2319
[2] http://pastebin.com/xXSGcJw0
--
ciao
Luca
http://gis.cri.fmach.it/delucchi/
www.lucadelu.org
On Thu, Feb 18, 2016 at 5:45 AM, Luca Delucchi <lucadeluge@gmail.com> wrote:
I think this annoing problem (to use again GRASS I have to exit and
start GRASS) appear because in the setUpClass function a new mapset is
created and used but in tearDownClass function the old mapset isn't
set back and the new mapset is removed.
I tried to fix this problem but I'm not able to store the old mapset
somewhere and use it in the tearDownClass (self doesn't work because
@classmethod decorator). Do you have any idea to solve this?
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).
[1]
https://trac.osgeo.org/grass/browser/grass/trunk/temporal/t.connect/testsuite/test_distr_tgis_db_raster3d.py?rev=67878#L19
On 18 February 2016 at 15:44, Vaclav Petras <wenzeslaus@gmail.com> wrote:
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).
thanks a lot, I'm blind :-), I looked that code before write this email.
However fixed in r67888.
[1]
https://trac.osgeo.org/grass/browser/grass/trunk/temporal/t.connect/testsuite/test_distr_tgis_db_raster3d.py?rev=67878#L19
--
ciao
Luca
http://gis.cri.fmach.it/delucchi/
www.lucadelu.org