@@ -142,7 +142,7 @@ def test_wait_until_finished_is_no_op_if_async_false(self):
142142 # Should be a no-op if is_async=False.
143143 cfg = self ._get_test_cloud_build_bundler ()
144144
145- with self ._mock_status (None ) as mock_status :
145+ with self ._mock_status (None ) as mock_status : # pytype: disable=wrong-arg-types
146146 b = cfg .set (is_async = False ).instantiate ()
147147 b .wait_until_finished ("test-name" )
148148 self .assertFalse (mock_status .called )
@@ -151,7 +151,7 @@ def test_wait_until_finished_is_called_with_happy_status_path(self):
151151 # Tests happy path: transitions from no status -> pending -> success.
152152 cfg = self ._get_test_cloud_build_bundler ()
153153
154- with self ._mock_status (
154+ with self ._mock_status ( # pytype: disable=wrong-arg-types
155155 None , CloudBuildStatus .PENDING , CloudBuildStatus .SUCCESS
156156 ) as mock_status :
157157 b = cfg .set (is_async = True ).instantiate ()
@@ -162,7 +162,7 @@ def test_wait_until_finished_raises_runtime_error_with_cloud_build_status_failur
162162 # Tests that we raise a runtime error if CloudBuildStatus.FAILURE status is returned.
163163 cfg = self ._get_test_cloud_build_bundler ()
164164
165- with self ._mock_status (
165+ with self ._mock_status ( # pytype: disable=wrong-arg-types
166166 None , CloudBuildStatus .PENDING , CloudBuildStatus .FAILURE
167167 ) as mock_status :
168168 b = cfg .set (is_async = True ).instantiate ()
@@ -177,7 +177,9 @@ def test_wait_until_finished_retries_with_runtime_error(self):
177177 # Tests that the query is retried if retrieving status fails with a RuntimeError.
178178 cfg = self ._get_test_cloud_build_bundler ()
179179
180- with self ._mock_status (RuntimeError ("fake error" ), CloudBuildStatus .SUCCESS ) as mock_status :
180+ with self ._mock_status (
181+ RuntimeError ("fake error" ), CloudBuildStatus .SUCCESS
182+ ) as mock_status : # pytype: disable=wrong-arg-types
181183 b = cfg .set (is_async = True ).instantiate ()
182184 b .wait_until_finished ("test-name" )
183185 self .assertEqual (2 , mock_status .call_count )
@@ -189,7 +191,7 @@ def test_wait_until_finished_triggers_timeout(self):
189191 with mock .patch ("time.perf_counter" ) as mock_perf_counter :
190192 mock_perf_counter .side_effect = [0 , 10 , 500 , 3601 ]
191193
192- with self ._mock_status (
194+ with self ._mock_status ( # pytype: disable=wrong-arg-types
193195 None , CloudBuildStatus .PENDING , CloudBuildStatus .PENDING
194196 ) as mock_status :
195197 b = cfg .set (is_async = True ).instantiate ()
0 commit comments