Hi,
The error we were getting are now fixed. :)
File Attached, if any improvements are needed please let me know.
Thank You
Sunveer
https://sunveersingh.github.io/
On Sun, Mar 25, 2018 at 6:30 PM, Luca Delucchi <[email protected]> wrote:
> On 25 March 2018 at 12:59, Sunveer Singh <[email protected]> wrote:
> > Hi,
> >
>
> Hi,
>
> > Sorry, but I don't get you if I rename the mapold, I also have to rename
> the
> > main map.
> >
>
> no no you have to assign new name to mapold (no geology) and probably
> could make sense to use a different name per mapold (like mapused or
> similar)
>
> > Can you please explain more
> >
>
>
> --
> ciao
> Luca
>
> www.lucadelu.org
>
"""
Name: v.to.db
Purpose: Tests v.to.db and its flags/options.
Author: Sunveer Singh
Copyright: (C) 2017 by Sunveer Singh and the GRASS Development Team
Licence: This program is free software under the GNU General Public
License (>=v2). Read the file COPYING that comes with GRASS
for details.
"""
import os
from grass.gunittest.case import TestCase
class Testvtodb(TestCase):
map='geology'
mapused='geology'
@classmethod
def setUpClass(cls):
cls.use_temp_region()
cls.runModule('g.copy', vector=(cls.map, cls.mapused))
@classmethod
def tearDownClass(cls):
cls.del_temp_region()
if os.path.isfile(cls.mapused):
os.remove(cls.mapused)
def testlength(self):
"""Testing option lenght and columns onemap_pro"""
self.assertModule('v.to.db', map=self.map, option="length", columns="onemap_pro")
topology = dict(points=0)
self.assertVectorFitsTopoInfo(self.map, topology)
def testarea(self):
"""Testing option area and columns PERIMETER"""
self.assertModule('v.to.db', map=self.map, option="area", columns="PERIMETER")
topology = dict(points=0)
self.assertVectorFitsTopoInfo(self.map, topology)
def testperimeter(self):
"""Testing option perimeter and columns SHAPE_area"""
self.assertModule('v.to.db', map=self.map, option="perimeter", columns="SHAPE_area")
topology = dict(points=0)
self.assertVectorFitsTopoInfo(self.map, topology)
def testcount(self):
"""Testing option count and columns SHAPE_len"""
self.assertModule('v.to.db', map=self.map, option="count", columns="SHAPE_len")
topology = dict(points=0)
self.assertVectorFitsTopoInfo(self.map, topology)
def testslope(self):
"""Testing option sides and with two columns GEOL250_ID, GEO_NAME"""
self.assertModule('v.to.db', map=self.map, option="sides", columns="GEOL250_ID, GEO_NAME")
topology = dict(points=0)
self.assertVectorFitsTopoInfo(self.map, topology)
if __name__ == '__main__':
from grass.gunittest.main import test
test()
_______________________________________________
grass-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-dev