changeset 40981:08f5482a6755

py3: spawn all python instances with legacy stdio enabled on Windows This fixes 6 more tests. See ef7119cd4965.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 17 Dec 2018 18:25:18 -0500
parents f6987f654356
children c296b8faa926
files tests/run-tests.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Mon Dec 17 17:44:45 2018 -0500
+++ b/tests/run-tests.py	Mon Dec 17 18:25:18 2018 -0500
@@ -1106,6 +1106,12 @@
         # IP addresses.
         env['LOCALIP'] = _strpath(self._localip())
 
+        # This has the same effect as Py_LegacyWindowsStdioFlag in exewrapper.c,
+        # but this is needed for testing python instances like dummyssh,
+        # dummysmtpd.py, and dumbhttp.py.
+        if PYTHON3 and os.name == 'nt':
+            env['PYTHONLEGACYWINDOWSSTDIO'] = '1'
+
         # Reset some environment variables to well-known values so that
         # the tests produce repeatable output.
         env['LANG'] = env['LC_ALL'] = env['LANGUAGE'] = 'C'