@@ -642,7 +642,6 @@ def test_callable_empty_rows(self):
642642 self .assertEqual (len (statuses ), 0 )
643643
644644 def test_callable_no_retry_strategy (self ):
645- from google .api_core .retry import Retry
646645 from google .cloud .bigtable .row import DirectRow
647646
648647 # Setup:
@@ -685,7 +684,6 @@ def test_callable_no_retry_strategy(self):
685684 self .assertEqual (result , expected_result )
686685
687686 def test_callable_retry (self ):
688- from google .api_core .retry import Retry
689687 from google .cloud .bigtable .row import DirectRow
690688 from google .cloud .bigtable .table import DEFAULT_RETRY
691689
@@ -735,7 +733,6 @@ def test_callable_retry(self):
735733 self .assertEqual (result , expected_result )
736734
737735 def test_callable_retry_timeout (self ):
738- from google .api_core .retry import Retry
739736 from google .cloud .bigtable .row import DirectRow
740737 from google .cloud .bigtable .table import DEFAULT_RETRY
741738
@@ -811,8 +808,8 @@ def test_do_mutate_retryable_rows(self):
811808 # Patch the stub used by the API method.
812809 client ._data_stub = _FakeStub ([response ])
813810
814- worker = self ._make_worker (table . _instance . _client ,
815- table .name , [row_1 , row_2 ])
811+ worker = self ._make_worker (
812+ table . _instance . _client , table .name , [row_1 , row_2 ])
816813 statuses = worker ._do_mutate_retryable_rows ()
817814
818815 result = [status .code for status in statuses ]
@@ -853,8 +850,8 @@ def test_do_mutate_retryable_rows_retry(self):
853850 # Patch the stub used by the API method.
854851 client ._data_stub = _FakeStub ([response ])
855852
856- worker = self ._make_worker (table . _instance . _client ,
857- table .name , [row_1 , row_2 , row_3 ])
853+ worker = self ._make_worker (
854+ table . _instance . _client , table .name , [row_1 , row_2 , row_3 ])
858855
859856 with self .assertRaises (_BigtableRetryableError ):
860857 worker ._do_mutate_retryable_rows ()
@@ -902,8 +899,9 @@ def test_do_mutate_retryable_rows_second_retry(self):
902899 # Patch the stub used by the API method.
903900 client ._data_stub = _FakeStub ([response ])
904901
905- worker = self ._make_worker (table ._instance ._client ,
906- table .name , [row_1 , row_2 , row_3 , row_4 ])
902+ worker = self ._make_worker (
903+ table ._instance ._client ,
904+ table .name , [row_1 , row_2 , row_3 , row_4 ])
907905 worker .responses_statuses = self ._make_responses_statuses ([
908906 self .SUCCESS ,
909907 self .RETRYABLE_1 ,
@@ -954,8 +952,9 @@ def test_do_mutate_retryable_rows_second_try(self):
954952 # Patch the stub used by the API method.
955953 client ._data_stub = _FakeStub ([response ])
956954
957- worker = self ._make_worker (table ._instance ._client ,
958- table .name , [row_1 , row_2 , row_3 , row_4 ])
955+ worker = self ._make_worker (
956+ table ._instance ._client ,
957+ table .name , [row_1 , row_2 , row_3 , row_4 ])
959958 worker .responses_statuses = self ._make_responses_statuses ([
960959 self .SUCCESS ,
961960 self .RETRYABLE_1 ,
@@ -974,7 +973,6 @@ def test_do_mutate_retryable_rows_second_try(self):
974973
975974 def test_do_mutate_retryable_rows_second_try_no_retryable (self ):
976975 from google .cloud .bigtable .row import DirectRow
977- from tests .unit ._testing import _FakeStub
978976
979977 # Setup:
980978 # - Mutate 2 rows.
@@ -993,10 +991,10 @@ def test_do_mutate_retryable_rows_second_try_no_retryable(self):
993991 row_2 = DirectRow (row_key = b'row_key_2' , table = table )
994992 row_2 .set_cell ('cf' , b'col' , b'value2' )
995993
996- worker = self ._make_worker (table . _instance . _client ,
997- table .name , [row_1 , row_2 ])
994+ worker = self ._make_worker (
995+ table . _instance . _client , table .name , [row_1 , row_2 ])
998996 worker .responses_statuses = self ._make_responses_statuses (
999- [self .SUCCESS , self .NON_RETRYABLE ])
997+ [self .SUCCESS , self .NON_RETRYABLE ])
1000998
1001999 statuses = worker ._do_mutate_retryable_rows ()
10021000
@@ -1023,8 +1021,9 @@ def test_do_mutate_retryable_rows_mismatch_num_responses(self):
10231021 # Patch the stub used by the API method.
10241022 client ._data_stub = _FakeStub ([response ])
10251023
1026- worker = self ._make_worker (table ._instance ._client ,
1027- table .name , [row_1 , row_2 ])
1024+ worker = self ._make_worker (
1025+ table ._instance ._client ,
1026+ table .name , [row_1 , row_2 ])
10281027 with self .assertRaises (RuntimeError ):
10291028 worker ._do_mutate_retryable_rows ()
10301029
0 commit comments