@@ -615,6 +615,7 @@ def mock_symlink(src, dst):
615615 relink .find_and_replace_owned_files (source_dir , target_dir , username )
616616 assert "Error creating symlink" in caplog .text
617617
618+
618619class TestEdgeCases :
619620 """Test edge cases and error handling."""
620621
@@ -726,6 +727,7 @@ def mock_symlink(src, dst):
726727 assert "Error creating symlink" in caplog .text
727728 assert source_file in caplog .text
728729
730+
729731class TestTiming :
730732 """Test suite for timing functionality."""
731733
@@ -989,3 +991,36 @@ def test_command_line_execution_actual_run(self, mock_dirs):
989991
990992 # Verify success messages in output
991993 assert "Created symbolic link:" in result .stdout
994+
995+
996+ class TestProcessArgs :
997+ """Test suite for process_args function."""
998+
999+ # pylint: disable=no-member
1000+
1001+ def test_process_args_quiet_sets_warning_level (self ):
1002+ """Test that quiet flag sets log level to WARNING."""
1003+ args = argparse .Namespace (quiet = True , verbose = False )
1004+ relink .process_args (args )
1005+ assert args .log_level == logging .WARNING
1006+
1007+ def test_process_args_verbose_sets_debug_level (self ):
1008+ """Test that verbose flag sets log level to DEBUG."""
1009+ args = argparse .Namespace (quiet = False , verbose = True )
1010+ relink .process_args (args )
1011+ assert args .log_level == logging .DEBUG
1012+
1013+ def test_process_args_default_sets_info_level (self ):
1014+ """Test that default (no flags) sets log level to INFO."""
1015+ args = argparse .Namespace (quiet = False , verbose = False )
1016+ relink .process_args (args )
1017+ assert args .log_level == logging .INFO
1018+
1019+ def test_process_args_modifies_args_in_place (self ):
1020+ """Test that process_args modifies the args object in place."""
1021+ args = argparse .Namespace (quiet = False , verbose = False )
1022+ original_args = args
1023+ relink .process_args (args )
1024+ # Should be the same object, modified in place
1025+ assert args is original_args
1026+ assert hasattr (args , "log_level" )
0 commit comments