jenkins-bot merged this change.
[FIX] Any environment variable added on Windows must be of type str on py 2
Bug: T209767
Change-Id: Ia597b396b007e4299a864f8337238bff823b5ac6
---
M tests/utils.py
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/utils.py b/tests/utils.py
index ff13b92..dfd32a2 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -643,7 +643,10 @@
'please update your Python.'))
# Any environment variables added on Windows must be of type
# str() on Python 2.
- env = os.environ.copy()
+ if OSWIN32 and PY2:
+ env = {str(k): str(v) for k, v in os.environ.items()}
+ else:
+ env = os.environ.copy()
# Prevent output by test package; e.g. 'max_retries reduced from x to y'
env[str('PYWIKIBOT_TEST_QUIET')] = str('1')
To view, visit change 474471. To unsubscribe, or for help writing mail filters, visit settings.