[GRASS-SVN] r71732 - in grass/trunk/db/db.columns: . testsuite
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Nov 14 05:09:32 PST 2017
Author: lucadelu
Date: 2017-11-14 05:09:32 -0800 (Tue, 14 Nov 2017)
New Revision: 71732
Added:
grass/trunk/db/db.columns/testsuite/
grass/trunk/db/db.columns/testsuite/test_dbcolumns.py
Log:
db.columns: added tests
Added: grass/trunk/db/db.columns/testsuite/test_dbcolumns.py
===================================================================
--- grass/trunk/db/db.columns/testsuite/test_dbcolumns.py (rev 0)
+++ grass/trunk/db/db.columns/testsuite/test_dbcolumns.py 2017-11-14 13:09:32 UTC (rev 71732)
@@ -0,0 +1,29 @@
+from grass.gunittest.case import TestCase
+from grass.gunittest.main import test
+from grass.script.core import read_command
+
+output = """cat
+OBJECTID
+WAKE_ZIPCO
+PERIMETER
+ZIPCODE_
+ZIPCODE_ID
+ZIPNAME
+ZIPNUM
+ZIPCODE
+NAME
+SHAPE_Leng
+SHAPE_Area
+"""
+
+class TestDbColumns(TestCase):
+ invect = 'zipcodes'
+ mapset = '$GISDBASE/$LOCATION_NAME/PERMANENT/sqlite/sqlite.db'
+
+ def test_dbcols(self):
+ cols = read_command('db.columns', table=self.invect,
+ database=self.mapset)
+ self.assertEqual(first=cols, second=output)
+
+if __name__ == '__main__':
+ test()
Property changes on: grass/trunk/db/db.columns/testsuite/test_dbcolumns.py
___________________________________________________________________
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
More information about the grass-commit
mailing list