@@ -891,14 +891,14 @@ def test_parse_all_for_empty_remote_scenario(self) -> None:
891891 test_file = os .path .join (temp_dir , 'test.py' )
892892 with open (test_file , 'w' ) as f :
893893 f .write ("print('test')" )
894-
894+
895895 repo .index .add (['test.py' ])
896896 commit = repo .index .commit ('Initial commit' )
897-
897+
898898 # Test that '--all' (returned by calculate_pre_push_commit_range for empty remote)
899899 # can be parsed to a valid commit range
900900 parsed_from , parsed_to , separator = parse_commit_range ('--all' , temp_dir )
901-
901+
902902 # Should return first commit to HEAD (which is the only commit in this case)
903903 assert parsed_from == commit .hexsha
904904 assert parsed_to == commit .hexsha
@@ -913,21 +913,21 @@ def test_parse_all_for_empty_remote_scenario_with_two_commits(self) -> None:
913913 test_file = os .path .join (temp_dir , 'test.py' )
914914 with open (test_file , 'w' ) as f :
915915 f .write ("print('test')" )
916-
916+
917917 repo .index .add (['test.py' ])
918918 commit1 = repo .index .commit ('First commit' )
919-
919+
920920 # Create second commit
921921 test_file2 = os .path .join (temp_dir , 'test2.py' )
922922 with open (test_file2 , 'w' ) as f :
923923 f .write ("print('test2')" )
924-
924+
925925 repo .index .add (['test2.py' ])
926926 commit2 = repo .index .commit ('Second commit' )
927-
927+
928928 # Test that '--all' returns first commit to HEAD (second commit)
929929 parsed_from , parsed_to , separator = parse_commit_range ('--all' , temp_dir )
930-
930+
931931 # Should return first commit to HEAD (second commit)
932932 assert parsed_from == commit1 .hexsha # First commit
933933 assert parsed_to == commit2 .hexsha # HEAD (second commit)
@@ -943,6 +943,7 @@ def test_parse_all_with_empty_repository_returns_none(self) -> None:
943943 assert parsed_to is None
944944 assert separator is None
945945
946+
946947class TestParsePreReceiveInput :
947948 """Test the parse_pre_receive_input function with various pre-receive hook input scenarios."""
948949
0 commit comments