Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

Commit c2505d6

Browse files
committed
Slightly larger token size for the test, because 100 isn't always big enough for a structured result
1 parent 1127226 commit c2505d6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/test_cli.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)