@@ -85,6 +85,7 @@ def test_fixture_setup(mock_client_init):
8585
8686 variables = dict (utils .DEFAULT_VARIABLES )
8787 variables ['rp_report_fixtures' ] = True
88+ test_path = 'examples/fixtures/test_fixture_setup'
8889 result = utils .run_pytest_tests (tests = ['examples/fixtures/test_fixture_setup' ], variables = variables )
8990 assert int (result ) == 0 , 'Exit code should be 0 (no errors)'
9091
@@ -94,14 +95,15 @@ def test_fixture_setup(mock_client_init):
9495
9596 call_args = mock_client .start_test_item .call_args_list
9697 setup_call_args = call_args [1 ][0 ]
97- step_name = 'function fixture setup: fixture_setup_config'
98+ fixture_name = f'{ test_path .split ("/" )[- 1 ]} _config'
99+ step_name = f'function fixture setup: { fixture_name } '
98100 assert setup_call_args [0 ] == step_name
99101
100102 setup_call_kwargs = call_args [1 ][1 ]
101103 assert not setup_call_kwargs ['has_stats' ]
102104
103105 teardown_call_args = call_args [- 1 ][0 ]
104- assert teardown_call_args [0 ] == 'function fixture teardown: fixture_setup_config '
106+ assert teardown_call_args [0 ] == f 'function fixture teardown: { fixture_name } '
105107
106108 setup_call_kwargs = call_args [- 1 ][1 ]
107109 assert not setup_call_kwargs ['has_stats' ]
@@ -128,7 +130,8 @@ def test_fixture_teardown(mock_client_init):
128130
129131 variables = dict (utils .DEFAULT_VARIABLES )
130132 variables ['rp_report_fixtures' ] = True
131- result = utils .run_pytest_tests (tests = ['examples/fixtures/test_fixture_teardown' ], variables = variables )
133+ test_path = 'examples/fixtures/test_fixture_teardown'
134+ result = utils .run_pytest_tests (tests = [test_path ], variables = variables )
132135 assert int (result ) == 0 , 'Exit code should be 0 (no errors)'
133136
134137 start_count = mock_client .start_test_item .call_count
@@ -137,14 +140,15 @@ def test_fixture_teardown(mock_client_init):
137140
138141 call_args = mock_client .start_test_item .call_args_list
139142 setup_call_args = call_args [1 ][0 ]
140- setup_step_name = 'function fixture setup: fixture_teardown_config'
143+ fixture_name = f'{ test_path .split ("/" )[- 1 ]} _config'
144+ setup_step_name = f'function fixture setup: { fixture_name } '
141145 assert setup_call_args [0 ] == setup_step_name
142146
143147 setup_call_kwargs = call_args [1 ][1 ]
144148 assert not setup_call_kwargs ['has_stats' ]
145149
146150 teardown_call_args = call_args [- 1 ][0 ]
147- teardown_step_name = 'function fixture teardown: fixture_teardown_config '
151+ teardown_step_name = f 'function fixture teardown: { fixture_name } '
148152 assert teardown_call_args [0 ] == teardown_step_name
149153
150154 setup_call_kwargs = call_args [- 1 ][1 ]
0 commit comments