File tree Expand file tree Collapse file tree 4 files changed +10
-11
lines changed Expand file tree Collapse file tree 4 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -104,9 +104,6 @@ def pytest_sessionstart(session):
104104
105105 if is_control (config ) and not config ._reporter_config .rp_launch_id :
106106 config .py_test_service .start_launch ()
107- if config ._reporter_config .rp_launch_uuid_print :
108- launch_id = config .py_test_service .rp .launch_id
109- print (f'Report Portal Launch UUID: { launch_id } ' , file = config ._reporter_config .rp_launch_uuid_print_output )
110107 if config .pluginmanager .hasplugin ('xdist' ) \
111108 or config .pluginmanager .hasplugin ('pytest-parallel' ):
112109 if not wait_launch (session .config .py_test_service .rp ):
Original file line number Diff line number Diff line change @@ -890,7 +890,9 @@ def start(self) -> None:
890890 retries = self ._config .rp_api_retries ,
891891 verify_ssl = self ._config .rp_verify_ssl ,
892892 launch_id = launch_id ,
893- log_batch_payload_size = self ._config .rp_log_batch_payload_size
893+ log_batch_payload_size = self ._config .rp_log_batch_payload_size ,
894+ launch_uuid_print = self ._config .rp_launch_uuid_print ,
895+ print_output = self ._config .rp_launch_uuid_print_output
894896 )
895897 if hasattr (self .rp , "get_project_settings" ):
896898 self .project_settings = self .rp .get_project_settings ()
Original file line number Diff line number Diff line change 11dill >= 0.3.6
22pytest >= 3.8.0
3- reportportal-client == 5.3.5
3+ reportportal-client == 5.4.0
44aenum >= 3.1.0
55requests >= 2.27.1
Original file line number Diff line number Diff line change @@ -304,8 +304,8 @@ def test_launch_uuid_print(mock_client_init):
304304
305305 assert int (result ) == 0 , 'Exit code should be 0 (no errors)'
306306 expect (mock_client_init .call_count == 1 )
307-
308- expect ('Report Portal Launch UUID:' in str_io . getvalue () )
307+ expect ( mock_client_init . call_args_list [ 0 ]. kwargs [ 'launch_uuid_print' ] == print_uuid )
308+ expect (mock_client_init . call_args_list [ 0 ]. kwargs [ 'print_output' ] is str_io )
309309 assert_expectations ()
310310
311311
@@ -326,8 +326,8 @@ def test_launch_uuid_print_stderr(mock_client_init):
326326
327327 assert int (result ) == 0 , 'Exit code should be 0 (no errors)'
328328 expect (mock_client_init .call_count == 1 )
329-
330- expect ('Report Portal Launch UUID:' in str_io . getvalue () )
329+ expect ( mock_client_init . call_args_list [ 0 ]. kwargs [ 'launch_uuid_print' ] == print_uuid )
330+ expect (mock_client_init . call_args_list [ 0 ]. kwargs [ 'print_output' ] is str_io )
331331 assert_expectations ()
332332
333333
@@ -348,8 +348,8 @@ def test_launch_uuid_print_invalid_output(mock_client_init):
348348
349349 assert int (result ) == 0 , 'Exit code should be 0 (no errors)'
350350 expect (mock_client_init .call_count == 1 )
351-
352- expect ('Report Portal Launch UUID:' in str_io . getvalue () )
351+ expect ( mock_client_init . call_args_list [ 0 ]. kwargs [ 'launch_uuid_print' ] == print_uuid )
352+ expect (mock_client_init . call_args_list [ 0 ]. kwargs [ 'print_output' ] is str_io )
353353 assert_expectations ()
354354
355355
You can’t perform that action at this time.
0 commit comments