aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio/tests/unit
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2016-03-21 10:44:09 -0700
committerGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2016-03-21 10:44:09 -0700
commitb08ee7a260d0f274554892cd3138215ab905ce77 (patch)
treee8f99d6b5dabd36309b9750c3d13cf24811ef1a5 /src/python/grpcio/tests/unit
parent20792927fed4b5096171501057dd279d1ace918b (diff)
parentefdefce3a729ef16c00c79a02f4f33c68c835b82 (diff)
Merge pull request #5653 from leifurhauks/py3_iterators
make iterators python3-compatible
Diffstat (limited to 'src/python/grpcio/tests/unit')
-rw-r--r--src/python/grpcio/tests/unit/beta/_beta_features_test.py5
-rw-r--r--src/python/grpcio/tests/unit/framework/face/testing/future_invocation_asynchronous_event_service_test_case.py3
-rw-r--r--src/python/grpcio/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py3
3 files changed, 10 insertions, 1 deletions
diff --git a/src/python/grpcio/tests/unit/beta/_beta_features_test.py b/src/python/grpcio/tests/unit/beta/_beta_features_test.py
index ea44177b49..ebdedcc11e 100644
--- a/src/python/grpcio/tests/unit/beta/_beta_features_test.py
+++ b/src/python/grpcio/tests/unit/beta/_beta_features_test.py
@@ -1,4 +1,4 @@
-# Copyright 2015, Google Inc.
+# Copyright 2015-2016, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -125,6 +125,9 @@ class _BlockingIterator(object):
def __iter__(self):
return self
+ def __next__(self):
+ return self.next()
+
def next(self):
with self._condition:
while True:
diff --git a/src/python/grpcio/tests/unit/framework/face/testing/future_invocation_asynchronous_event_service_test_case.py b/src/python/grpcio/tests/unit/framework/face/testing/future_invocation_asynchronous_event_service_test_case.py
index 4d27cbe186..8adfc613c6 100644
--- a/src/python/grpcio/tests/unit/framework/face/testing/future_invocation_asynchronous_event_service_test_case.py
+++ b/src/python/grpcio/tests/unit/framework/face/testing/future_invocation_asynchronous_event_service_test_case.py
@@ -68,6 +68,9 @@ class _PauseableIterator(object):
def __iter__(self):
return self
+ def __next__(self):
+ return self.next()
+
def next(self):
with self._condition:
while self._paused:
diff --git a/src/python/grpcio/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py b/src/python/grpcio/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py
index fb4bee6f86..c1081a7d99 100644
--- a/src/python/grpcio/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py
+++ b/src/python/grpcio/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py
@@ -69,6 +69,9 @@ class _PauseableIterator(object):
def __iter__(self):
return self
+ def __next__(self):
+ return self.next()
+
def next(self):
with self._condition:
while self._paused: