@@ -920,21 +920,21 @@ def test_stop_error_logs(self, caplog):
920920 bidi_rpc .is_active = False
921921
922922 def test_fatal_exceptions_will_shutdown_consumer (self , caplog ):
923- """
924- https://github.com/googleapis/python-api-core/issues/820
925- Exceptions thrown in the BackgroundConsumer that
926- lead to the consumer halting should also stop the thread and rpc.
927- """
928- caplog .set_level (logging .DEBUG )
929- bidi_rpc = mock .create_autospec (bidi .BidiRpc , instance = True )
930- bidi_rpc .is_active = True
931- on_response = mock .Mock (spec = ["__call__" ])
923+ """
924+ https://github.com/googleapis/python-api-core/issues/820
925+ Exceptions thrown in the BackgroundConsumer that
926+ lead to the consumer halting should also stop the thread and rpc.
927+ """
928+ caplog .set_level (logging .DEBUG )
929+ bidi_rpc = mock .create_autospec (bidi .BidiRpc , instance = True )
930+ bidi_rpc .is_active = True
931+ on_response = mock .Mock (spec = ["__call__" ])
932932
933- bidi_rpc .open .side_effect = ValueError ()
933+ bidi_rpc .open .side_effect = ValueError ()
934934
935- consumer = bidi .BackgroundConsumer (bidi_rpc , on_response )
935+ consumer = bidi .BackgroundConsumer (bidi_rpc , on_response )
936936
937- consumer .start ()
937+ consumer .start ()
938938
939- # We want to make sure that close is called, which will surface the error to the caller.
940- bidi_rpc .close .assert_called_once ()
939+ # We want to make sure that close is called, which will surface the error to the caller.
940+ bidi_rpc .close .assert_called_once ()
0 commit comments