Skip to content

Commit

Permalink
test: added test for /rename
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Nov 5, 2023
1 parent 656e8d3 commit 12d922f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,21 @@ def test_command_fork(args: list[str], runner: CliRunner, name: str):
assert result.exit_code == 0


def test_command_rename(args: list[str], runner: CliRunner, name: str):
# tests the /rename command
name += "-rename"
args.append(f"{CMDFIX}rename {name}")
print(f"running: gptme {' '.join(args)}")
result = runner.invoke(gptme.cli.main, args)
assert result.exit_code == 0

# test with "auto" name
args.append(f"{CMDFIX}rename auto")
print(f"running: gptme {' '.join(args)}")
result = runner.invoke(gptme.cli.main, args)
assert result.exit_code == 0


@pytest.mark.slow
def test_fileblock(args: list[str], runner: CliRunner):
args_orig = args.copy()
Expand Down

0 comments on commit 12d922f

Please sign in to comment.