diff options
author | Ken Payson <kpayson@google.com> | 2016-06-08 13:06:44 -0700 |
---|---|---|
committer | Ken Payson <kpayson@google.com> | 2016-06-10 11:48:24 -0700 |
commit | 1efb6017ec1edb26706895dfe71f4d72ea387cf4 (patch) | |
tree | eaede04a7db3e55c9c0954185192dc84231c2637 /src/python/grpcio/tests/unit/framework | |
parent | 698d3e91ff42db3fe640cc369e8edf85abc5343d (diff) |
Initial Python3 support
Notable Changes:
-Convert all str types to byte types at cython layer (ascii encoding)
-Use six for packages that have different names in Python2/Python3
-By default, unit tests are compiled/run in Python2.7 and Python3.4
-Ensure MACOSX_BUILD_TARGET is at least 10.7
Diffstat (limited to 'src/python/grpcio/tests/unit/framework')
-rw-r--r-- | src/python/grpcio/tests/unit/framework/interfaces/base/test_cases.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/python/grpcio/tests/unit/framework/interfaces/base/test_cases.py b/src/python/grpcio/tests/unit/framework/interfaces/base/test_cases.py index 4f8e26c9a2..5d16bf98be 100644 --- a/src/python/grpcio/tests/unit/framework/interfaces/base/test_cases.py +++ b/src/python/grpcio/tests/unit/framework/interfaces/base/test_cases.py @@ -29,6 +29,8 @@ """Tests of the base interface of RPC Framework.""" +from __future__ import division + import logging import random import threading @@ -54,13 +56,13 @@ class _Serialization(test_interfaces.Serialization): return request + request def deserialize_request(self, serialized_request): - return serialized_request[:len(serialized_request) / 2] + return serialized_request[:len(serialized_request) // 2] def serialize_response(self, response): return response * 3 def deserialize_response(self, serialized_response): - return serialized_response[2 * len(serialized_response) / 3:] + return serialized_response[2 * len(serialized_response) // 3:] def _advance(quadruples, operator, controller): |