Blame 0002-Add-output-encoding-to-tests-for-Python3.patch
|
Jamie Lennox |
218320a |
From 4e53fa958a2ad8d188ee921aebcb3943073e2850 Mon Sep 17 00:00:00 2001
|
|
Jamie Lennox |
218320a |
From: Jamie Lennox <jamielennox@redhat.com>
|
|
Jamie Lennox |
218320a |
Date: Mon, 23 Sep 2013 17:23:39 +1000
|
|
Jamie Lennox |
218320a |
Subject: [PATCH] Add output encoding to tests for Python3
|
|
Jamie Lennox |
218320a |
|
|
Jamie Lennox |
218320a |
In certain environment setups python 3 will detect the appropriate
|
|
Jamie Lennox |
218320a |
output as ASCII and will fail when trying to write a unicode string.
|
|
Jamie Lennox |
218320a |
Override this by forcing UTF-8.
|
|
Jamie Lennox |
218320a |
---
|
|
Jamie Lennox |
218320a |
falcon/tests/test_wsgi_errors.py | 3 ++-
|
|
Jamie Lennox |
218320a |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
Jamie Lennox |
218320a |
|
|
Jamie Lennox |
218320a |
diff --git a/falcon/tests/test_wsgi_errors.py b/falcon/tests/test_wsgi_errors.py
|
|
Jamie Lennox |
218320a |
index 7f93500..26b78f6 100644
|
|
Jamie Lennox |
218320a |
--- a/falcon/tests/test_wsgi_errors.py
|
|
Jamie Lennox |
218320a |
+++ b/falcon/tests/test_wsgi_errors.py
|
|
Jamie Lennox |
218320a |
@@ -27,7 +27,8 @@ class TestWSGIError(testing.TestBase):
|
|
Jamie Lennox |
218320a |
if six.PY3:
|
|
Jamie Lennox |
218320a |
# Simulate Gunicorn's behavior under Python 3
|
|
Jamie Lennox |
218320a |
self.wsgierrors = io.TextIOWrapper(self.wsgierrors_buffer,
|
|
Jamie Lennox |
218320a |
- line_buffering=True)
|
|
Jamie Lennox |
218320a |
+ line_buffering=True,
|
|
Jamie Lennox |
218320a |
+ encoding='utf-8')
|
|
Jamie Lennox |
218320a |
else:
|
|
Jamie Lennox |
218320a |
# WSGI servers typically present an open file object,
|
|
Jamie Lennox |
218320a |
# with undefined encoding, so do the encoding manually.
|
|
Jamie Lennox |
218320a |
--
|
|
Jamie Lennox |
218320a |
1.8.3.1
|
|
Jamie Lennox |
218320a |
|