Skip to content

Commit 67d5923

Browse files
committed
Slightly more efficient testing
1 parent a7be308 commit 67d5923

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

tests/test_command_tree.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,8 @@ def test_subcommands_help(args: list[str], expected: bool):
6363
encoding="utf-8",
6464
)
6565
assert result.returncode == 0
66-
if expected:
67-
assert SUBCMD_FLAG in result.stdout
68-
assert SUBCMD_HELP in result.stdout
69-
else:
70-
assert SUBCMD_FLAG not in result.stdout
71-
assert SUBCMD_HELP not in result.stdout
66+
assert bool(SUBCMD_FLAG in result.stdout) == expected
67+
assert bool(SUBCMD_HELP in result.stdout) == expected
7268

7369

7470
def test_subcommands_top_tree():

0 commit comments

Comments
 (0)