Skip to content

Commit 3f6917a

Browse files
committed
fixed type-check errors
1 parent 6f93871 commit 3f6917a

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tests/integration/test_run_collection.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,20 @@ class TestRunCollectionSync:
1818

1919
def setup_runs(self, apify_client: ApifyClient) -> None:
2020
self.created_runs = []
21-
self.created_runs.append(apify_client.actor(self.APIFY_HELLO_WORLD_ACTOR).call())
2221

23-
self.created_runs.append(apify_client.actor(self.APIFY_HELLO_WORLD_ACTOR).call(timeout_secs=1))
22+
successfull_run = apify_client.actor(self.APIFY_HELLO_WORLD_ACTOR).call()
23+
if successfull_run is not None:
24+
self.created_runs.append(successfull_run)
25+
26+
timed_out_run = apify_client.actor(self.APIFY_HELLO_WORLD_ACTOR).call(timeout_secs=1)
27+
if timed_out_run is not None:
28+
self.created_runs.append(timed_out_run)
2429

2530
def teadown_runs(self, apify_client: ApifyClient) -> None:
2631
for run in self.created_runs:
27-
apify_client.run(run.get('id')).delete()
32+
run_id = run.get('id')
33+
if isinstance(run_id, str):
34+
apify_client.run(run_id).delete()
2835

2936
async def test_run_collection_list_multiple_statuses(self, apify_client: ApifyClient) -> None:
3037
self.setup_runs(apify_client)

0 commit comments

Comments
 (0)