tests: test_help cosmetics

Adjust some comments and remove parentheses (which are unnecessary in
assert statements in Python).

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
This commit is contained in:
Marti Bolivar 2019-09-06 08:59:13 -06:00
parent ecb81be96b
commit f170447619
1 changed files with 6 additions and 4 deletions

View File

@ -5,14 +5,16 @@
from west.main import BUILTIN_COMMAND_NAMES
from conftest import cmd
def test_help(west_init_tmpdir):
# Check that output from help is equivalent to -h
def test_help_and_dash_h(west_init_tmpdir):
# Test "west help" and "west -h" are the same.
h1out = cmd('help')
h2out = cmd('-h')
assert(h1out == h2out)
assert h1out == h2out
# Test "west help <command>" and "west <command> -h" for built-in
# commands.
for c in BUILTIN_COMMAND_NAMES:
h1out = cmd('help {}'.format(c))
h2out = cmd('{} -h'.format(c))
assert(h1out == h2out)
assert h1out == h2out