From 31f9112a0ce4adf7a2633322cf0a8692cc442236 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 14 Dec 2022 20:00:43 +0100 Subject: [PATCH] Fixup tests on Windows, use UTF-8 for subprocess --- tests/unit/session/test_parallel.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/unit/session/test_parallel.py b/tests/unit/session/test_parallel.py index e08ef1f0c1..7e82906808 100644 --- a/tests/unit/session/test_parallel.py +++ b/tests/unit/session/test_parallel.py @@ -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