From 2f9ba99c21654dff2f91950ec2b39d1dc32351d5 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sat, 29 Apr 2023 13:17:26 -0400 Subject: [PATCH] Restore error output in runtests.py (#10110) --- scripts/runtests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/runtests.py b/scripts/runtests.py index e5b38ef83..8c6efd71c 100644 --- a/scripts/runtests.py +++ b/scripts/runtests.py @@ -97,7 +97,7 @@ def main() -> None: print(f"\nRunning Pyright ({'stricter' if strict_params else 'base' } configs) for Python {_PYTHON_VERSION}...") pyright_result = subprocess.run( [sys.executable, "tests/pyright_test.py", path, "--pythonversion", _PYTHON_VERSION] + strict_params, - capture_output=True, + stderr=subprocess.PIPE, text=True, ) if re.match(_NPX_ERROR_PATTERN, pyright_result.stderr): @@ -156,7 +156,7 @@ def main() -> None: "-p", _TESTCASES_CONFIG_FILE, ] - pyright_testcases_result = subprocess.run(command, capture_output=True, text=True) + pyright_testcases_result = subprocess.run(command, stderr=subprocess.PIPE, text=True) if re.match(_NPX_ERROR_PATTERN, pyright_testcases_result.stderr): print(_NPX_ERROR_MESSAGE) pyright_testcases_returncode = 0 @@ -169,7 +169,7 @@ def main() -> None: print(f"\nRunning mypy regression tests for Python {_PYTHON_VERSION}...") regr_test_result = subprocess.run( [sys.executable, "tests/regr_test.py", "stdlib" if folder == "stdlib" else stub, "--python-version", _PYTHON_VERSION], - capture_output=True, + stderr=subprocess.PIPE, text=True, ) # No test means they all ran successfully (0 out of 0). Not all 3rd-party stubs have regression tests.