Fix typo && remove unecessary except

pull/17490/head
Lidi Zheng 6 years ago
parent 45b3230ef2
commit 0e2f4061f5
  1. 8
      src/python/grpcio_tests/tests/status/_grpc_status_test.py

@ -54,7 +54,7 @@ def _error_details_unary_unary(request, servicer_context):
details.Pack(
error_details_pb2.DebugInfo(
stack_entries=traceback.format_stack(),
detail='Intensionally invoked'))
detail='Intentionally invoked'))
rich_status = status_pb2.Status(
code=code_pb2.INTERNAL,
message=_STATUS_DETAILS,
@ -118,10 +118,8 @@ class StatusTest(unittest.TestCase):
self._channel.close()
def test_status_ok(self):
try:
_, call = self._channel.unary_unary(_STATUS_OK).with_call(_REQUEST)
except grpc.RpcError as rpc_error:
self.fail(rpc_error)
_, call = self._channel.unary_unary(_STATUS_OK).with_call(_REQUEST)
# Succeed RPC doesn't have status
status = rpc_status.from_call(call)
self.assertIs(status, None)

Loading…
Cancel
Save