@@ -109,7 +109,7 @@ def __init__(
109
109
launch_uuid_print : bool = False ,
110
110
print_output : OutputType = OutputType .STDOUT ,
111
111
truncate_attributes : bool = True ,
112
- ** kwargs : Any
112
+ ** _ : Any
113
113
) -> None :
114
114
"""Initialize the class instance with arguments.
115
115
@@ -157,7 +157,7 @@ async def session(self) -> RetryingClientSession:
157
157
if self ._session :
158
158
return self ._session
159
159
160
- if self .verify_ssl is None or (type (self .verify_ssl ) == bool and not self .verify_ssl ):
160
+ if self .verify_ssl is None or (type (self .verify_ssl ) is bool and not self .verify_ssl ):
161
161
ssl_config = False
162
162
else :
163
163
if type (self .verify_ssl ) is str :
@@ -183,7 +183,7 @@ async def session(self) -> RetryingClientSession:
183
183
}
184
184
185
185
if self .http_timeout :
186
- if type (self .http_timeout ) == tuple :
186
+ if type (self .http_timeout ) is tuple :
187
187
connect_timeout , read_timeout = self .http_timeout
188
188
else :
189
189
connect_timeout , read_timeout = self .http_timeout , self .http_timeout
@@ -230,7 +230,7 @@ async def start_launch(self,
230
230
attributes : Optional [Union [list , dict ]] = None ,
231
231
rerun : bool = False ,
232
232
rerun_of : Optional [str ] = None ,
233
- ** kwargs ) -> Optional [str ]:
233
+ ** _ ) -> Optional [str ]:
234
234
"""Start a new Launch with the given arguments.
235
235
236
236
:param name: Launch name.
@@ -279,8 +279,9 @@ async def start_test_item(self,
279
279
parameters : Optional [dict ] = None ,
280
280
code_ref : Optional [str ] = None ,
281
281
test_case_id : Optional [str ] = None ,
282
- has_stats : bool = True ,
283
- retry : bool = False ,
282
+ has_stats : Optional [bool ] = True ,
283
+ retry : Optional [bool ] = False ,
284
+ retry_of : Optional [str ] = None ,
284
285
** _ : Any ) -> Optional [str ]:
285
286
"""Start Test Case/Suite/Step/Nested Step Item.
286
287
@@ -299,6 +300,8 @@ async def start_test_item(self,
299
300
:param test_case_id: A unique ID of the current Step.
300
301
:param has_stats: Set to False if test item is a Nested Step.
301
302
:param retry: Used to report retry of the test. Allowed values: "True" or "False".
303
+ :param retry_of: For retry mode specifies which test item will be marked as retried. Should be used
304
+ with the 'retry' parameter.
302
305
:return: Test Item UUID if successfully started or None.
303
306
"""
304
307
if parent_item_id :
@@ -316,7 +319,8 @@ async def start_test_item(self,
316
319
has_stats = has_stats ,
317
320
parameters = parameters ,
318
321
retry = retry ,
319
- test_case_id = test_case_id
322
+ test_case_id = test_case_id ,
323
+ retry_of = retry_of
320
324
).payload
321
325
322
326
response = await AsyncHttpRequest ((await self .session ()).post , url = url , json = request_payload ).make ()
@@ -334,25 +338,30 @@ async def finish_test_item(self,
334
338
item_id : Union [str , Task [str ]],
335
339
end_time : str ,
336
340
* ,
337
- status : str = None ,
338
- description : str = None ,
341
+ status : Optional [ str ] = None ,
342
+ description : Optional [ str ] = None ,
339
343
attributes : Optional [Union [list , dict ]] = None ,
344
+ test_case_id : Optional [str ] = None ,
340
345
issue : Optional [Issue ] = None ,
341
- retry : bool = False ,
342
- ** kwargs : Any ) -> Optional [str ]:
346
+ retry : Optional [bool ] = False ,
347
+ retry_of : Optional [str ] = None ,
348
+ ** _ : Any ) -> Optional [str ]:
343
349
"""Finish Test Suite/Case/Step/Nested Step Item.
344
350
345
- :param launch_uuid: A launch UUID where to finish the Test Item.
346
- :param item_id: ID of the Test Item.
347
- :param end_time: The Item end time.
348
- :param status: Test status. Allowed values:
349
- PASSED, FAILED, STOPPED, SKIPPED, INTERRUPTED, CANCELLED, INFO, WARN or None.
350
- :param description: Test Item description. Overrides description from start request.
351
- :param attributes: Test Item attributes(tags). Pairs of key and value. These attributes override
352
- attributes on start Test Item call.
353
- :param issue: Issue which will be attached to the current Item.
354
- :param retry: Used to report retry of the test. Allowed values: "True" or "False".
355
- :return: Response message.
351
+ :param launch_uuid: A launch UUID where to finish the Test Item.
352
+ :param item_id: ID of the Test Item.
353
+ :param end_time: The Item end time.
354
+ :param status: Test status. Allowed values:
355
+ PASSED, FAILED, STOPPED, SKIPPED, INTERRUPTED, CANCELLED, INFO, WARN or None.
356
+ :param description: Test Item description. Overrides description from start request.
357
+ :param attributes: Test Item attributes(tags). Pairs of key and value. These attributes override
358
+ attributes on start Test Item call.
359
+ :param test_case_id: A unique ID of the current Step. Overrides passed on start request.
360
+ :param issue: Issue which will be attached to the current Item.
361
+ :param retry: Used to report retry of the test. Allowed values: "True" or "False".
362
+ :param retry_of: For retry mode specifies which test item will be marked as retried. Should be used
363
+ with the 'retry' parameter.
364
+ :return: Response message.
356
365
"""
357
366
url = self .__get_item_url (item_id )
358
367
request_payload = AsyncItemFinishRequest (
@@ -361,9 +370,11 @@ async def finish_test_item(self,
361
370
status ,
362
371
attributes = verify_value_length (attributes ) if self .truncate_attributes else attributes ,
363
372
description = description ,
373
+ test_case_id = test_case_id ,
364
374
is_skipped_an_issue = self .is_skipped_an_issue ,
365
375
issue = issue ,
366
- retry = retry
376
+ retry = retry ,
377
+ retry_of = retry_of
367
378
).payload
368
379
response = await AsyncHttpRequest ((await self .session ()).put , url = url , json = request_payload ).make ()
369
380
if not response :
@@ -377,15 +388,15 @@ async def finish_launch(self,
377
388
launch_uuid : Union [str , Task [str ]],
378
389
end_time : str ,
379
390
* ,
380
- status : str = None ,
391
+ status : Optional [ str ] = None ,
381
392
attributes : Optional [Union [list , dict ]] = None ,
382
393
** kwargs : Any ) -> Optional [str ]:
383
394
"""Finish a Launch.
384
395
385
396
:param launch_uuid: A Launch UUID to finish.
386
397
:param end_time: Launch end time.
387
398
:param status: Launch status. Can be one of the followings:
388
- PASSED, FAILED, STOPPED, SKIPPED, INTERRUPTED, CANCELLED.
399
+ PASSED, FAILED, STOPPED, SKIPPED, INTERRUPTED, CANCELLED or None .
389
400
:param attributes: Launch attributes. These attributes override attributes on Start Launch call.
390
401
:return: Response message or None.
391
402
"""
@@ -530,7 +541,7 @@ def clone(self) -> 'Client':
530
541
"""Clone the client object, set current Item ID as cloned item ID.
531
542
532
543
:return: Cloned client object
533
- :rtype: AsyncRPClient
544
+ :rtype: Client
534
545
"""
535
546
cloned = Client (
536
547
endpoint = self .endpoint ,
@@ -721,6 +732,7 @@ async def start_test_item(self,
721
732
code_ref : Optional [str ] = None ,
722
733
retry : bool = False ,
723
734
test_case_id : Optional [str ] = None ,
735
+ retry_of : Optional [str ] = None ,
724
736
** kwargs : Any ) -> Optional [str ]:
725
737
"""Start Test Case/Suite/Step/Nested Step Item.
726
738
@@ -738,13 +750,15 @@ async def start_test_item(self,
738
750
:param code_ref: Physical location of the Test Item.
739
751
:param retry: Used to report retry of the test. Allowed values: "True" or "False".
740
752
:param test_case_id: A unique ID of the current Step.
753
+ :param retry_of: For retry mode specifies which test item will be marked as retried. Should be used
754
+ with the 'retry' parameter.
741
755
:return: Test Item UUID if successfully started or None.
742
756
"""
743
757
item_id = await self .__client .start_test_item (self .launch_uuid , name , start_time , item_type ,
744
758
description = description , attributes = attributes ,
745
759
parameters = parameters , parent_item_id = parent_item_id ,
746
760
has_stats = has_stats , code_ref = code_ref , retry = retry ,
747
- test_case_id = test_case_id , ** kwargs )
761
+ test_case_id = test_case_id , retry_of = retry_of , ** kwargs )
748
762
if item_id and item_id is not NOT_FOUND :
749
763
logger .debug ('start_test_item - ID: %s' , item_id )
750
764
self ._add_current_item (item_id )
@@ -753,35 +767,39 @@ async def start_test_item(self,
753
767
async def finish_test_item (self ,
754
768
item_id : str ,
755
769
end_time : str ,
756
- status : str = None ,
770
+ status : Optional [ str ] = None ,
757
771
issue : Optional [Issue ] = None ,
758
772
attributes : Optional [Union [list , dict ]] = None ,
759
773
description : str = None ,
760
774
retry : bool = False ,
775
+ test_case_id : Optional [str ] = None ,
776
+ retry_of : Optional [str ] = None ,
761
777
** kwargs : Any ) -> Optional [str ]:
762
778
"""Finish Test Suite/Case/Step/Nested Step Item.
763
779
764
- :param item_id: ID of the Test Item.
765
- :param end_time: The Item end time.
766
- :param status: Test status. Allowed values:
767
- PASSED, FAILED, STOPPED, SKIPPED, INTERRUPTED, CANCELLED, INFO, WARN or None.
768
- :param issue: Issue which will be attached to the current Item.
769
- :param attributes: Test Item attributes(tags). Pairs of key and value. These attributes override
770
- attributes on start Test Item call.
771
- :param description: Test Item description. Overrides description from start request.
772
- :param retry: Used to report retry of the test. Allowed values: "True" or "False".
773
- :return: Response message.
774
- """
775
- result = await self .__client .finish_test_item (self .launch_uuid , item_id , end_time , status = status ,
776
- issue = issue , attributes = attributes ,
777
- description = description ,
778
- retry = retry , ** kwargs )
780
+ :param item_id: ID of the Test Item.
781
+ :param end_time: The Item end time.
782
+ :param status: Test status. Allowed values:
783
+ PASSED, FAILED, STOPPED, SKIPPED, INTERRUPTED, CANCELLED, INFO, WARN or None.
784
+ :param issue: Issue which will be attached to the current Item.
785
+ :param attributes: Test Item attributes(tags). Pairs of key and value. These attributes override
786
+ attributes on start Test Item call.
787
+ :param description: Test Item description. Overrides description from start request.
788
+ :param retry: Used to report retry of the test. Allowed values: "True" or "False".
789
+ :param test_case_id: A unique ID of the current Step.
790
+ :param retry_of: For retry mode specifies which test item will be marked as retried. Should be used
791
+ with the 'retry' parameter.
792
+ :return: Response message.
793
+ """
794
+ result = await self .__client .finish_test_item (
795
+ self .launch_uuid , item_id , end_time , status = status , issue = issue , attributes = attributes ,
796
+ description = description , retry = retry , test_case_id = test_case_id , retry_of = retry_of , ** kwargs )
779
797
self ._remove_current_item ()
780
798
return result
781
799
782
800
async def finish_launch (self ,
783
801
end_time : str ,
784
- status : str = None ,
802
+ status : Optional [ str ] = None ,
785
803
attributes : Optional [Union [list , dict ]] = None ,
786
804
** kwargs : Any ) -> Optional [str ]:
787
805
"""Finish a Launch.
@@ -1132,6 +1150,7 @@ def start_test_item(self,
1132
1150
code_ref : Optional [str ] = None ,
1133
1151
retry : bool = False ,
1134
1152
test_case_id : Optional [str ] = None ,
1153
+ retry_of : Optional [str ] = None ,
1135
1154
** kwargs : Any ) -> Task [str ]:
1136
1155
"""Start Test Case/Suite/Step/Nested Step Item.
1137
1156
@@ -1149,50 +1168,56 @@ def start_test_item(self,
1149
1168
:param code_ref: Physical location of the Test Item.
1150
1169
:param retry: Used to report retry of the test. Allowed values: "True" or "False".
1151
1170
:param test_case_id: A unique ID of the current Step.
1171
+ :param retry_of: For retry mode specifies which test item will be marked as retried. Should be used
1172
+ with the 'retry' parameter.
1152
1173
:return: Test Item UUID if successfully started or None.
1153
1174
"""
1154
1175
item_id_coro = self .__client .start_test_item (self .launch_uuid , name , start_time , item_type ,
1155
1176
description = description , attributes = attributes ,
1156
1177
parameters = parameters , parent_item_id = parent_item_id ,
1157
1178
has_stats = has_stats , code_ref = code_ref , retry = retry ,
1158
- test_case_id = test_case_id , ** kwargs )
1179
+ test_case_id = test_case_id , retry_of = retry_of , ** kwargs )
1159
1180
item_id_task = self .create_task (item_id_coro )
1160
1181
self ._add_current_item (item_id_task )
1161
1182
return item_id_task
1162
1183
1163
1184
def finish_test_item (self ,
1164
1185
item_id : Task [str ],
1165
1186
end_time : str ,
1166
- status : str = None ,
1187
+ status : Optional [ str ] = None ,
1167
1188
issue : Optional [Issue ] = None ,
1168
1189
attributes : Optional [Union [list , dict ]] = None ,
1169
1190
description : str = None ,
1170
1191
retry : bool = False ,
1192
+ test_case_id : Optional [str ] = None ,
1193
+ retry_of : Optional [str ] = None ,
1171
1194
** kwargs : Any ) -> Task [str ]:
1172
1195
"""Finish Test Suite/Case/Step/Nested Step Item.
1173
1196
1174
- :param item_id: ID of the Test Item.
1175
- :param end_time: The Item end time.
1176
- :param status: Test status. Allowed values:
1177
- PASSED, FAILED, STOPPED, SKIPPED, INTERRUPTED, CANCELLED, INFO, WARN or None.
1178
- :param issue: Issue which will be attached to the current Item.
1179
- :param attributes: Test Item attributes(tags). Pairs of key and value. These attributes override
1180
- attributes on start Test Item call.
1181
- :param description: Test Item description. Overrides description from start request.
1182
- :param retry: Used to report retry of the test. Allowed values: "True" or "False".
1183
- :return: Response message.
1184
- """
1185
- result_coro = self .__client .finish_test_item (self .launch_uuid , item_id , end_time , status = status ,
1186
- issue = issue , attributes = attributes ,
1187
- description = description ,
1188
- retry = retry , ** kwargs )
1197
+ :param item_id: ID of the Test Item.
1198
+ :param end_time: The Item end time.
1199
+ :param status: Test status. Allowed values:
1200
+ PASSED, FAILED, STOPPED, SKIPPED, INTERRUPTED, CANCELLED, INFO, WARN or None.
1201
+ :param issue: Issue which will be attached to the current Item.
1202
+ :param attributes: Test Item attributes(tags). Pairs of key and value. These attributes override
1203
+ attributes on start Test Item call.
1204
+ :param description: Test Item description. Overrides description from start request.
1205
+ :param retry: Used to report retry of the test. Allowed values: "True" or "False".
1206
+ :param test_case_id: A unique ID of the current Step.
1207
+ :param retry_of: For retry mode specifies which test item will be marked as retried. Should be used
1208
+ with the 'retry' parameter.
1209
+ :return: Response message.
1210
+ """
1211
+ result_coro = self .__client .finish_test_item (
1212
+ self .launch_uuid , item_id , end_time , status = status , issue = issue , attributes = attributes ,
1213
+ description = description , retry = retry , test_case_id = test_case_id , retry_of = retry_of , ** kwargs )
1189
1214
result_task = self .create_task (result_coro )
1190
1215
self ._remove_current_item ()
1191
1216
return result_task
1192
1217
1193
1218
def finish_launch (self ,
1194
1219
end_time : str ,
1195
- status : str = None ,
1220
+ status : Optional [ str ] = None ,
1196
1221
attributes : Optional [Union [list , dict ]] = None ,
1197
1222
** kwargs : Any ) -> Task [str ]:
1198
1223
"""Finish a Launch.
0 commit comments