Skip to content

Commit

Permalink
Force option type to int when testing log level in click
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Jun 23, 2021
1 parent 32438ea commit ecdfe42
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python/lsst/daf/butler/tests/cliLogTestBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ def hasLsstLogHandler(logger):


@click.command()
@click.option("--expected-pyroot-level")
@click.option("--expected-pybutler-level")
@click.option("--expected-lsstroot-level")
@click.option("--expected-lsstbutler-level")
@click.option("--expected-pyroot-level", type=int)
@click.option("--expected-pybutler-level", type=int)
@click.option("--expected-lsstroot-level", type=int)
@click.option("--expected-lsstbutler-level", type=int)
def command_log_settings_test(expected_pyroot_level,
expected_pybutler_level,
expected_lsstroot_level,
Expand All @@ -92,7 +92,7 @@ def command_log_settings_test(expected_pyroot_level,
"lsstButler")])
for expected, actual, name in logLevels:
if expected != actual:
raise(click.ClickException(f"expected {name} level to be {expected}, actual:{actual}"))
raise(click.ClickException(f"expected {name} level to be {expected!r}, actual:{actual!r}"))


class CliLogTestBase():
Expand Down

0 comments on commit ecdfe42

Please sign in to comment.