@@ -41,6 +41,7 @@ def test_single_file_success(
4141 mock_get_staging_root ,
4242 mock_stage_data ,
4343 tmp_path ,
44+ caplog ,
4445 ):
4546 """Test main() logic flow when a single file stages successfully."""
4647 # Setup
@@ -62,6 +63,7 @@ def test_single_file_success(
6263 mock_stage_data .assert_called_once_with (
6364 test_file , inputdata_root , staging_root , False
6465 )
66+ assert "No need to run relink.py" in caplog .text
6567
6668 @patch .object (rimport , "stage_data" )
6769 @patch .object (rimport , "get_staging_root" )
@@ -153,6 +155,10 @@ def stage_data_side_effect(src, *_args, **_kwargs):
153155 assert "error processing" in captured .err
154156 assert "Test error for file2" in captured .err
155157
158+ # Check that message about not needing to run relink was NOT printed
159+ assert "No need to run relink.py" not in captured .err
160+ assert "No need to run relink.py" not in captured .out
161+
156162 @patch .object (rimport , "ensure_running_as" )
157163 def test_nonexistent_inputdata_directory (
158164 self , _mock_ensure_running_as , tmp_path , capsys
@@ -226,6 +232,7 @@ def test_check_mode_calls(
226232 mock_get_staging_root ,
227233 mock_stage_data ,
228234 tmp_path ,
235+ caplog ,
229236 ):
230237 """Test that --check mode skips the user check but does call stage_data."""
231238 inputdata_root = tmp_path / "inputdata"
@@ -248,6 +255,8 @@ def test_check_mode_calls(
248255 mock_stage_data .assert_called_once_with (
249256 test_file , inputdata_root , staging_root , True
250257 )
258+ # Message about relink.py should not have been printed
259+ assert "No need to run relink.py" not in caplog .text
251260
252261 @patch .object (rimport , "stage_data" )
253262 @patch .object (rimport , "get_staging_root" )
0 commit comments