瀏覽代碼

Decode JSON stdout from test subprocess

Thomas Kluyver 5 年之前
父節點
當前提交
c51cd9c92c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      nsist/tests/test_main.py

+ 1 - 1
nsist/tests/test_main.py

@@ -79,7 +79,7 @@ def test_installer(console_eg_copy, tmp_path):
     # Run installed program
     res = run([str(inst_python), str(inst_launch_script)],
               check=True, stdout=PIPE)
-    json_res = json.loads(res.stdout)
+    json_res = json.loads(res.stdout.decode('utf-8', 'replace'))
 
     assert json_res['py_executable'] == str(inst_python)
     assert json_res['py_version'].startswith('3.6.3')  # Set in installer.cfg