Skip to content

Commit f5de81c

Browse files
committed
consistent use of the run function
1 parent 8df3d02 commit f5de81c

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

test/conftest.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,8 @@ def run_command(data_dir):
4444
"ARDUINO_SKETCHBOOK_DIR": data_dir
4545
}
4646

47-
def _run(*args):
48-
# Accept a list of arguments cli_line('lib list --format json')
49-
# Return a full command line string e.g. 'arduino-cli help --format json'
50-
cli_full_line = ' '.join([cli_path, ' '.join(str(arg) for arg in args)])
47+
def _run(cmd_string):
48+
cli_full_line = "{} {}".format(cli_path, cmd_string)
5149
return run(cli_full_line, echo=False, hide=True, warn=True, env=env)
5250

5351
return _run

test/test_main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def test_command_lib_list(run_command):
2020
result = run_command('lib list')
2121
assert result.ok
2222
assert '' == result.stderr
23-
result = run_command('lib list', '--format json')
23+
result = run_command('lib list --format json')
2424
assert '' == result.stdout
2525

2626

0 commit comments

Comments
 (0)