Hi,
Let's, start with v.to.db, I attached the test for it.
if any improvements are needed, please let me know.
Thank You
Sunveer
https://sunveersingh.github.io/
On Sat, Mar 24, 2018 at 5:19 PM, Veronica Andreo <[email protected]>
wrote:
> Hi Sunveer,
>
> It's great to have you back!! Thanks much for your contributions and
> enthusiasm!
>
> Here are some modules that are lacking tests:
> * v.to.db
> * v.to.rast
> * v.support
> * r.what
> * several r.out.* modules
> * i.pca
>
> Cheers from the code sprint in Bonn :)
> Vero
>
>
> 2018-03-24 10:08 GMT+01:00 Sunveer Singh <[email protected]>:
>
>> Thanks a lot.
>>
>> Now on which module should I write test?
>>
>> Thank You
>> Sunveer
>> https://sunveersingh.github.io
>>
>> On Sat, 24 Mar 2018, 14:37 Luca Delucchi, <[email protected]> wrote:
>>
>>> On 24 March 2018 at 03:33, Sunveer Singh <[email protected]>
>>> wrote:
>>> > Hi,
>>> >
>>>
>>> Hi Sunveer,
>>>
>>> > Thanks for the feedback, I have attached the complete working test,
>>> run on
>>> > nc_basic_spm_grass7
>>>
>>> thanks a lot, submitted in r72546.
>>> https://trac.osgeo.org/grass/changeset/72546
>>>
>>> >
>>> > Thank You
>>> > Sunveer
>>> > https://sunveersingh.github.io/
>>> >
>>>
>>>
>>> --
>>> ciao
>>> Luca
>>>
>>> www.lucadelu.org
>>>
>>
>> _______________________________________________
>> grass-dev mailing list
>> [email protected]
>> https://lists.osgeo.org/mailman/listinfo/grass-dev
>>
>
>
"""
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.
"""
from grass.gunittest.case import TestCase
class Testvtodb(TestCase):
map='geology'
@classmethod
def setUpClass(cls):
cls.use_temp_region()
@classmethod
def tearDownClass(cls):
cls.del_temp_region()
def testlength(self):
"""Testing option lenght and columns cat"""
self.assertModule('v.to.db', map=self.map, option="length", columns="CAT")
topology = dict(points=0)
self.assertVectorFitsTopoInfo(self.map, topology)
def testarea(self):
"""Testing option area and columns ID"""
self.assertModule('v.to.db', map=self.map, option="area", columns="ID")
topology = dict(points=0)
self.assertVectorFitsTopoInfo(self.map, topology)
def testperimeter(self):
"""Testing option perimeter and columns LABEL"""
self.assertModule('v.to.db', map=self.map, option="perimeter", columns="LABEL")
topology = dict(points=0)
self.assertVectorFitsTopoInfo(self.map, topology)
def testcount(self):
"""Testing option count and columns LOCATION"""
self.assertModule('v.to.db', map=self.map, option="count", columns="LOCATION")
topology = dict(points=0)
self.assertVectorFitsTopoInfo(self.map, topology)
def testslope(self):
"""Testing option slope and columns CITY"""
self.assertModule('v.to.db', map=self.map, option="slope", columns="CITY")
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