Skip to content

Commit

Permalink
Fixup tests on Windows, use UTF-8 for subprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
hroncok committed Dec 14, 2022
1 parent 34b2d4b commit 31f9112
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/unit/session/test_parallel.py
Expand Up @@ -270,9 +270,11 @@ def test_parallel_result_json_concurrent(cmd, parallel_project, tmp_path):
def invoke_tox_in_thread(thread_name, result_json):
try:
# needs to be process to have it's own stdout
kwargs = {"encoding": "utf-8"} if sys.version_info[0] > 2 else {}
invoke_result[thread_name] = subprocess.check_output(
[sys.executable, "-m", "tox", "-p", "all", "--result-json", str(result_json)],
universal_newlines=True,
**kwargs
)
except subprocess.CalledProcessError as exception:
invoke_result[thread_name] = exception
Expand Down

0 comments on commit 31f9112

Please sign in to comment.