Skip to content

Commit

Permalink
test: fix blinking test
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Nov 3, 2023
1 parent 6d3aa92 commit dad5a25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ def test_block(name: str, lang: str, runner: CliRunner):
result = runner.invoke(gptme.cli.main, args)
output = result.output
print(f"output: {output}\nEND")
output = output.split("# start")[-1]
# check everything after the second '# start'
# (get not the user impersonation command, but the assistant message and everything after)
output = output.split("# start", 2)[-1]
printcmd = "print" if lang == "python" else "echo"
assert f"\n\n {printcmd}" in output
assert result.exit_code == 0
Expand Down

0 comments on commit dad5a25

Please sign in to comment.