From a6bf3ccac8e9d4f554d7e1093b93c30ca2255405 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Wed, 18 Apr 2018 20:58:56 -0700 Subject: Eliminate non-iterator-returned suppression --- .pylintrc-tests | 1 - src/python/grpcio_tests/tests/unit/_invocation_defects_test.py | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pylintrc-tests b/.pylintrc-tests index 20aaddd6e9..e09b3fa1ce 100644 --- a/.pylintrc-tests +++ b/.pylintrc-tests @@ -56,7 +56,6 @@ disable= line-too-long, wrong-import-position, wrong-import-order, - non-iterator-returned, # -- END OF TEST-SPECIFIC SUPPRESSIONS -- diff --git a/src/python/grpcio_tests/tests/unit/_invocation_defects_test.py b/src/python/grpcio_tests/tests/unit/_invocation_defects_test.py index e40cca8b24..93a5fdf9ff 100644 --- a/src/python/grpcio_tests/tests/unit/_invocation_defects_test.py +++ b/src/python/grpcio_tests/tests/unit/_invocation_defects_test.py @@ -165,11 +165,13 @@ class FailAfterFewIterationsCounter(object): def __next__(self): if self._current >= self._high: - raise Exception("This is a deliberate failure in a unit test.") + raise test_control.Defect() else: self._current += 1 return self._bytestring + next = __next__ + def _unary_unary_multi_callable(channel): return channel.unary_unary(_UNARY_UNARY) -- cgit v1.2.3