[GRASS-SVN] r60618 - grass/trunk/general/g.mlist

svn_grass at osgeo.org svn_grass at osgeo.org
Fri May 30 17:30:49 PDT 2014


Author: wenzeslaus
Date: 2014-05-30 17:30:48 -0700 (Fri, 30 May 2014)
New Revision: 60618

Added:
   grass/trunk/general/g.mlist/test_g_mlist.py
Log:
g.mlist: test of wrong flag combinations (test for r60617)

Added: grass/trunk/general/g.mlist/test_g_mlist.py
===================================================================
--- grass/trunk/general/g.mlist/test_g_mlist.py	                        (rev 0)
+++ grass/trunk/general/g.mlist/test_g_mlist.py	2014-05-31 00:30:48 UTC (rev 60618)
@@ -0,0 +1,39 @@
+
+import unittest
+from grass.script import start_command
+import subprocess
+
+class GMlistWrongParamertersTest(unittest.TestCase):
+
+    def setUp(self):
+        pass
+
+    def test_pt_flags(self):
+        self.maxDiff = None
+        p = start_command('g.mlist', flags='pt', type='rast', stderr=subprocess.PIPE)
+        stderr = p.communicate()[1]
+        self.assertEqual(stderr, "ERROR: -p/-f and -t are mutually exclusive\n")
+
+    def test_ft_flags(self):
+        self.maxDiff = None
+        p = start_command('g.mlist', flags='ft', type='rast', stderr=subprocess.PIPE)
+        stderr = p.communicate()[1]
+        self.assertEqual(stderr, "ERROR: -p/-f and -t are mutually exclusive\n")
+
+    def test_pf_flags(self):
+        self.maxDiff = None
+        p = start_command('g.mlist', flags='pf', type='rast', stderr=subprocess.PIPE)
+        stderr = p.communicate()[1]
+        self.assertEqual(stderr, "ERROR: -p and -f are mutually exclusive\n")
+
+    def test_re_flags(self):
+        self.maxDiff = None
+        p = start_command('g.mlist', flags='re', type='rast', stderr=subprocess.PIPE)
+        stderr = p.communicate()[1]
+        self.assertEqual(stderr, "ERROR: -r and -e are mutually exclusive\n")
+
+    def tearDown(self):
+        pass
+
+if __name__ == '__main__':
+    unittest.main()


Property changes on: grass/trunk/general/g.mlist/test_g_mlist.py
___________________________________________________________________
Added: svn:mime-type
   + text/x-python
Added: svn:eol-style
   + native



More information about the grass-commit mailing list