Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7708d4c

Browse files
author
Maurizio Branca
committedSep 25, 2019
Fix my dumb mistake merging run with context code
1 parent 213ae36 commit 7708d4c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed
 

‎test/common.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
# a commercial license, send an email to license@arduino.cc.
1515
import collections
1616
import os
17-
import pytest
18-
import invoke
1917

2018
from invoke.context import Context
2119

@@ -50,6 +48,6 @@ def _run(cmd_string):
5048
cli_full_line = "{} {}".format(cli_path, cmd_string)
5149
run_context = Context()
5250
with run_context.cd(working_dir):
53-
return invoke.run(cli_full_line, echo=False, hide=True, warn=True, env=env)
51+
return run_context.run(cli_full_line, echo=False, hide=True, warn=True, env=env)
5452

5553
return _run

‎test/conftest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ def _run_session_command(pytestconfig, tmpdir_factory, downloads_dir):
7777
"ARDUINO_DOWNLOADS_DIR": downloads_dir,
7878
"ARDUINO_SKETCHBOOK_DIR": data_dir,
7979
}
80-
working_dir = tmpdir_factory.mktemp("SessionTestWork")
80+
# it looks like the pyinvoke library has a few problems in dealing with the path
81+
# object, so to avoid this issue we can convert them to str.
82+
# Take a look at https://github.com/pyinvoke/invoke/issues/454 for more details.
83+
working_dir = str(tmpdir_factory.mktemp("SessionTestWork"))
8184

8285
return build_runner(cli_path, env, working_dir)
8386

0 commit comments

Comments
 (0)
Please sign in to comment.