From cdeeca0f087b18bf3906dea72de1de37a534b42c Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 17 Jun 2024 16:30:53 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=20Explicitly=20set=20encoding=20@?= =?UTF-8?q?=20`subprocess.run()`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This invocation is present in the `test_issue_9765` regression test that is always skipped unconditionally, resulting in the `EncodingWarning` never manifesting itself in CI or development environments of the contributors. --- testing/acceptance_test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py index 9b03ad088..c30c27d3d 100644 --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -1471,7 +1471,11 @@ def test_issue_9765(pytester: Pytester) -> None: # the bug. We also use pytest rather than python -m pytest for the same # PYTHONPATH reason. subprocess.run( - ["pytest", "my_package"], capture_output=True, check=True, text=True + ["pytest", "my_package"], + capture_output=True, + check=True, + encoding="utf-8", + text=True, ) except subprocess.CalledProcessError as exc: raise AssertionError(