[GRASS-SVN] r71865 - grass/trunk/scripts/g.search.modules/testsuite

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Nov 28 07:06:55 PST 2017


Author: annakrat
Date: 2017-11-28 07:06:55 -0800 (Tue, 28 Nov 2017)
New Revision: 71865

Modified:
   grass/trunk/scripts/g.search.modules/testsuite/test_g_search_modules.py
Log:
g.search.modules: fix test

Modified: grass/trunk/scripts/g.search.modules/testsuite/test_g_search_modules.py
===================================================================
--- grass/trunk/scripts/g.search.modules/testsuite/test_g_search_modules.py	2017-11-28 14:44:34 UTC (rev 71864)
+++ grass/trunk/scripts/g.search.modules/testsuite/test_g_search_modules.py	2017-11-28 15:06:55 UTC (rev 71865)
@@ -18,9 +18,7 @@
 
 import termcolor
 
-import os
 
-
 class TestSearchModule(TestCase):
 
     def test_terminal_output(self):
@@ -28,7 +26,7 @@
         module = SimpleModule('g.search.modules', keyword="water")
         self.assertModule(module)
         stdout = module.outputs.stdout
-        self.assertEqual(stdout.split()[0], 'r.watershed')
+        self.assertEqual(stdout.split()[0], 'r.basins.fill')
 
     def test_json_output(self):
         import json
@@ -36,7 +34,7 @@
         self.assertModule(module)
         stdout = json.loads(module.outputs.stdout)
         self.assertEqual(len(stdout), 6, 'Six modules found')
-        self.assertEqual(stdout[3]['name'], 'r.basins.fill', 'r.basins.fill')
+        self.assertEqual(stdout[3]['name'], 'r.water.outlet', 'r.water.outlet')
         self.assertTrue('keywords' in stdout[3]['attributes'])
 
     def test_shell_outout(self):
@@ -44,14 +42,14 @@
         self.assertModule(module)
         stdout = module.outputs.stdout.split()
         self.assertEqual(len(stdout), 6)
-        self.assertEqual(stdout[3], 'r.basins.fill')
+        self.assertEqual(stdout[3], 'r.water.outlet')
 
     def test_colored_terminal(self):
         module = SimpleModule('g.search.modules', keyword="water", flags="c")
         self.assertModule(module)
         stdout = module.outputs.stdout.split()
         self.assertEqual(stdout[0],
-                         termcolor.colored('r.watershed',
+                         termcolor.colored('r.basins.fill',
                                            attrs=['bold']))
 
     def test_manual_pages(self):



More information about the grass-commit mailing list