Skip to content

Commit

Permalink
Merge pull request #912 from karanphil/fix_search_keywords
Browse files Browse the repository at this point in the history
Fixing search keywords
  • Loading branch information
arnaudbore authored Feb 20, 2024
2 parents 9412961 + c40de48 commit f12192f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/scil_search_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ def _build_arg_parser():
def main():
parser = _build_arg_parser()
args = parser.parse_args()
logging.getLogger().setLevel(logging.getLevelName(args.verbose))
if args.verbose == "WARNING":
logging.getLogger().setLevel(logging.INFO)
else:
logging.getLogger().setLevel(logging.getLevelName(args.verbose))

# Use directory of this script, should work with most installation setups
script_dir = pathlib.Path(__file__).parent
Expand Down
Empty file modified scripts/scil_sh_to_aodf.py
100644 → 100755
Empty file.
15 changes: 15 additions & 0 deletions scripts/tests/test_search_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,18 @@
def test_help_option(script_runner):
ret = script_runner.run('scil_search_keywords.py', '--help')
assert ret.success


def test_no_verbose(script_runner):
ret = script_runner.run('scil_search_keywords.py', 'mti')
assert ret.success


def test_verbose_option(script_runner):
ret = script_runner.run('scil_search_keywords.py', 'mti', '-v')
assert ret.success


def test_not_find(script_runner):
ret = script_runner.run('scil_search_keywords.py', 'toto')
assert ret.success

0 comments on commit f12192f

Please sign in to comment.