Imported Upstream version 1.27.0
[platform/upstream/grpc.git] / src / python / grpcio_tests / tests / unit / _signal_client.py
index 075fe7f..0be1270 100644 (file)
@@ -55,8 +55,8 @@ def main_unary(server_target):
     with grpc.insecure_channel(server_target) as channel:
         multicallable = channel.unary_unary(UNARY_UNARY)
         signal.signal(signal.SIGINT, handle_sigint)
-        per_process_rpc_future = multicallable.future(
-            _MESSAGE, wait_for_ready=True)
+        per_process_rpc_future = multicallable.future(_MESSAGE,
+                                                      wait_for_ready=True)
         result = per_process_rpc_future.result()
         assert False, _ASSERTION_MESSAGE
 
@@ -90,8 +90,8 @@ def main_streaming_with_exception(server_target):
     """Initiate a streaming RPC with a signal handler that will raise."""
     channel = grpc.insecure_channel(server_target)
     try:
-        for _ in channel.unary_stream(UNARY_STREAM)(
-                _MESSAGE, wait_for_ready=True):
+        for _ in channel.unary_stream(UNARY_STREAM)(_MESSAGE,
+                                                    wait_for_ready=True):
             pass
     except KeyboardInterrupt:
         sys.stderr.write("Running signal handler.\n")
@@ -105,10 +105,9 @@ if __name__ == '__main__':
     parser = argparse.ArgumentParser(description='Signal test client.')
     parser.add_argument('server', help='Server target')
     parser.add_argument('arity', help='Arity', choices=('unary', 'streaming'))
-    parser.add_argument(
-        '--exception',
-        help='Whether the signal throws an exception',
-        action='store_true')
+    parser.add_argument('--exception',
+                        help='Whether the signal throws an exception',
+                        action='store_true')
     args = parser.parse_args()
     if args.arity == 'unary' and not args.exception:
         main_unary(args.server)