@@ -19,11 +19,12 @@ def test_commit(cli_runner, temp_git_repo):
1919 with cli_runner .isolated_filesystem ():
2020 os .chdir (temp_git_repo .working_dir ) # change to the temporary repo directory
2121
22+ response_token_size = 200 # smaller than the default so tests go a little faster
2223 # Scenario 1: Only unstaged changes
2324 create_and_write_file ("test1.txt" , "This is a test file." )
2425 repo = Repo (temp_git_repo .working_dir )
2526 repo .git .add ("test1.txt" ) # stage the new file
26- result = cli_runner .invoke (cli , ["commit" , "-y" ])
27+ result = cli_runner .invoke (cli , ["commit" , "-y" , "-t" , response_token_size ])
2728 assert result .exit_code == 0
2829 assert "✅ 1 file(s) committed" in result .output
2930
@@ -32,12 +33,12 @@ def test_commit(cli_runner, temp_git_repo):
3233 repo = Repo (temp_git_repo .working_dir )
3334 repo .git .add ("test2.txt" ) # stage the new file
3435 create_and_write_file ("test3.txt" , "This is yet another test file." ) # unstaged file
35- result = cli_runner .invoke (cli , ["commit" , "-y" ])
36+ result = cli_runner .invoke (cli , ["commit" , "-y" , "-t" , response_token_size ])
3637 assert result .exit_code == 0
3738 assert "✅ 1 file(s) committed" in result .output
3839
3940 # Scenario 3: No changes at all
40- result = cli_runner .invoke (cli , ["commit" , "-y" ])
41+ result = cli_runner .invoke (cli , ["commit" , "-y" , "-t" , response_token_size ])
4142 assert result .exit_code == 0
4243 assert "No changes" in result .output
4344
0 commit comments