|
@@ -1,9 +1,9 @@
|
|
|
"""
|
|
|
-TEST: test_g_search_module.py
|
|
|
+TEST: test_g.search.modules.py
|
|
|
|
|
|
AUTHOR(S): Jachym Cepicky <jachym.cepicky gmail com>
|
|
|
|
|
|
-PURPOSE: Test g.search.module script outputs
|
|
|
+PURPOSE: Test g.search.modules script outputs
|
|
|
|
|
|
COPYRIGHT: (C) 2015 Jachym Ceppicky, and by the GRASS Development Team
|
|
|
|
|
@@ -25,14 +25,14 @@ class TestSearchModule(TestCase):
|
|
|
|
|
|
def test_terminal_output(self):
|
|
|
""" """
|
|
|
- module = SimpleModule('g.search.module', keyword="water")
|
|
|
+ module = SimpleModule('g.search.modules', keyword="water")
|
|
|
self.assertModule(module)
|
|
|
stdout = module.outputs.stdout
|
|
|
self.assertEqual(stdout.split()[0], 'r.watershed')
|
|
|
|
|
|
def test_json_output(self):
|
|
|
import json
|
|
|
- module = SimpleModule('g.search.module', keyword="water", flags="j")
|
|
|
+ module = SimpleModule('g.search.modules', keyword="water", flags="j")
|
|
|
self.assertModule(module)
|
|
|
stdout = json.loads(module.outputs.stdout)
|
|
|
self.assertEqual(len(stdout), 6, 'Six modules found')
|
|
@@ -40,14 +40,14 @@ class TestSearchModule(TestCase):
|
|
|
self.assertTrue('keywords' in stdout[3]['attributes'])
|
|
|
|
|
|
def test_shell_outout(self):
|
|
|
- module = SimpleModule('g.search.module', keyword="water", flags="g")
|
|
|
+ module = SimpleModule('g.search.modules', keyword="water", flags="g")
|
|
|
self.assertModule(module)
|
|
|
stdout = module.outputs.stdout.split()
|
|
|
self.assertEqual(len(stdout), 6)
|
|
|
self.assertEqual(stdout[3], 'r.basins.fill')
|
|
|
|
|
|
def test_colored_terminal(self):
|
|
|
- module = SimpleModule('g.search.module', keyword="water", flags="c")
|
|
|
+ module = SimpleModule('g.search.modules', keyword="water", flags="c")
|
|
|
self.assertModule(module)
|
|
|
stdout = module.outputs.stdout.split()
|
|
|
self.assertEqual(stdout[0],
|
|
@@ -55,7 +55,7 @@ class TestSearchModule(TestCase):
|
|
|
attrs=['bold']))
|
|
|
|
|
|
def test_manual_pages(self):
|
|
|
- module = SimpleModule('g.search.module', keyword="kapri", flags="gm")
|
|
|
+ module = SimpleModule('g.search.modules', keyword="kapri", flags="gm")
|
|
|
self.assertModule(module)
|
|
|
stdout = module.outputs.stdout.split()
|
|
|
self.assertEqual(len(stdout), 2)
|