Skip to content

Commit 474972c

Browse files
committed
Logging info error (#132)
Had an error where if you went to one of the root commands you would get an error about "INFO" not being valid. This resolves that error Also adds a test to ensure it does not creep back in!
1 parent 7d1f41a commit 474972c

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

cwmscli/utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import logging
1+
import logging as py_logging
22

33
import click
44

tests/cli/test_all_commands_help.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ def test_root_version_flag(runner):
4545
assert f"cwms-cli version {get_cwms_cli_version()}" in result.output
4646

4747

48+
def test_log_level_info_is_accepted(runner):
49+
result = runner.invoke(cli, ["--log-level", "INFO", "--version"])
50+
assert result.exit_code == 0
51+
assert f"cwms-cli version {get_cwms_cli_version()}" in result.output
52+
53+
4854
@pytest.mark.parametrize("path,command", list(iter_commands(cli)))
4955
def test_every_command_has_help(runner, path, command):
5056
"""

0 commit comments

Comments
 (0)