On Mon, Nov 30, 2015 at 4:12 PM, Jachym Cepicky <jachym.cepicky@gmail.com>
wrote:
the script called g.search.module is now in trunk, I've added tests
Great. It is really fast (without -m). It will be useful.
(Vašek: they seem to be far too verbose to me, anything I could do about
that?)
Yes, partially. The it is written with verbosity rather higher than lower
but some things would need more programming. No quiet option available now
but at least some basic form might be relatively easy to add.
I've left the colorize and print_output functions in the file, reason:
better code structure would have to be implemented (read: IMHO decorator at
least for colorize should be used and I'm to doubt for now to get working)
Yes, perhaps we should let it settle.
Now I see that termcolor is not necessarily installed (I had no reason to
install it so far), so some better error handing is needed.
With -m, I'm getting a lot of these:
g.search.module search -m
warning: file `<standard input>', around line 172:
table wider than line width
I get those with test as well and additionally also:
======================================================================
FAIL: test_json_output (__main__.TestSearchModule)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test_g_search_module.py", line 37, in test_json_output
self.assertEqual(stdout[3]['name'], 'r.basins.fill', 'r.basins.fill')
AssertionError: r.basins.fill
u'r.sim.water' != 'r.basins.fill'
======================================================================
FAIL: test_shell_outout (__main__.TestSearchModule)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test_g_search_module.py", line 45, in test_shell_outout
self.assertEqual(stdout[3], 'r.basins.fill')
AssertionError: 'r.sim.water' != 'r.basins.fill'
- r.sim.water
+ r.basins.fill
Can't investigate more now but I'm definitively looking forward to using it.