Skip to content

Commit b2b96b3

Browse files
committed
Fix tests failing with click 8.2+
1 parent 6985c8d commit b2b96b3

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/test_common.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,11 @@
55
def test_list_commands():
66
runner = CliRunner()
77
result = runner.invoke(cli, [])
8+
9+
# Since click 8.2, the exit code is 2, when usage is invoked without
10+
# -h/--help. Since we support older releases as well, it can be one of two.
11+
assert result.exit_code in (0, 2)
12+
13+
# This can be avoided by asking for help
14+
result = runner.invoke(cli, ['--help'])
815
assert result.exit_code == 0

0 commit comments

Comments
 (0)