diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py index ac7fab3d2..0f3b35036 100644 --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -1464,14 +1464,21 @@ def test_issue_9765(pytester: Pytester) -> None: } ) - subprocess.run([sys.executable, "setup.py", "develop"], check=True) + subprocess.run( + [sys.executable, "-Im", "pip", "install", "-e", "."], + check=True, + ) try: # We are using subprocess.run rather than pytester.run on purpose. # pytester.run is adding the current directory to PYTHONPATH which avoids # 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(