@@ -172,9 +172,9 @@ def test_veneer_grpc_headers(self):
172172 wrapped_user_agent_sorted = " " .join (
173173 sorted (client_info .to_user_agent ().split (" " ))
174174 )
175- assert VENEER_HEADER_REGEX .match (
176- wrapped_user_agent_sorted
177- ), f"' { wrapped_user_agent_sorted } ' does not match { VENEER_HEADER_REGEX } "
175+ assert VENEER_HEADER_REGEX .match (wrapped_user_agent_sorted ), (
176+ f"' { wrapped_user_agent_sorted } ' does not match { VENEER_HEADER_REGEX } "
177+ )
178178 client .close ()
179179
180180 def test__start_background_channel_refresh_task_exists (self ):
@@ -301,9 +301,9 @@ def test__manage_channel_first_sleep(
301301 pass
302302 sleep .assert_called_once ()
303303 call_time = sleep .call_args [0 ][1 ]
304- assert (
305- abs ( call_time - expected_sleep ) < 0.1
306- ), f"refresh_interval: { refresh_interval } , wait_time: { wait_time } , expected_sleep: { expected_sleep } "
304+ assert abs ( call_time - expected_sleep ) < 0.1 , (
305+ f"refresh_interval: { refresh_interval } , wait_time: { wait_time } , expected_sleep: { expected_sleep } "
306+ )
307307 client .close ()
308308
309309 def test__manage_channel_ping_and_warm (self ):
@@ -319,9 +319,9 @@ def test__manage_channel_ping_and_warm(self):
319319 )
320320 with mock .patch .object (* sleep_tuple ) as sleep_mock :
321321 sleep_mock .side_effect = [None , asyncio .CancelledError ]
322- ping_and_warm = (
323- client . _ping_and_warm_instances
324- ) = CrossSync . _Sync_Impl . Mock ()
322+ ping_and_warm = client . _ping_and_warm_instances = (
323+ CrossSync . _Sync_Impl . Mock ()
324+ )
325325 try :
326326 client ._manage_channel (10 )
327327 except asyncio .CancelledError :
@@ -363,9 +363,9 @@ def test__manage_channel_sleeps(self, refresh_interval, num_cycles, expected_sle
363363 pass
364364 assert sleep .call_count == num_cycles
365365 total_sleep = sum ([call [0 ][1 ] for call in sleep .call_args_list ])
366- assert (
367- abs ( total_sleep - expected_sleep ) < 0.5
368- ), f"refresh_interval= { refresh_interval } , num_cycles= { num_cycles } , expected_sleep= { expected_sleep } "
366+ assert abs ( total_sleep - expected_sleep ) < 0.5 , (
367+ f"refresh_interval= { refresh_interval } , num_cycles= { num_cycles } , expected_sleep= { expected_sleep } "
368+ )
369369 client .close ()
370370
371371 def test__manage_channel_random (self ):
@@ -1772,11 +1772,14 @@ def test_read_rows_sharded_multiple_queries(self):
17721772 with mock .patch .object (
17731773 table .client ._gapic_client , "read_rows"
17741774 ) as read_rows :
1775- read_rows .side_effect = lambda * args , ** kwargs : CrossSync ._Sync_Impl .TestReadRows ._make_gapic_stream (
1776- [
1777- CrossSync ._Sync_Impl .TestReadRows ._make_chunk (row_key = k )
1778- for k in args [0 ].rows .row_keys
1779- ]
1775+ read_rows .side_effect = (
1776+ lambda * args ,
1777+ ** kwargs : CrossSync ._Sync_Impl .TestReadRows ._make_gapic_stream (
1778+ [
1779+ CrossSync ._Sync_Impl .TestReadRows ._make_chunk (row_key = k )
1780+ for k in args [0 ].rows .row_keys
1781+ ]
1782+ )
17801783 )
17811784 query_1 = ReadRowsQuery (b"test_1" )
17821785 query_2 = ReadRowsQuery (b"test_2" )
0 commit comments