Skip to content

Commit

Permalink
fix: attempt at fixing test caused by tabcomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Oct 11, 2023
1 parent 6eb763c commit b02804b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion gptme/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,14 @@ def main(
# init
logger.debug("Started")
load_dotenv()
register_tabcomplete()
_load_readline_history()
init_llm(llm) # set up API_KEY and API_BASE

if "PYTEST_CURRENT_TEST" in os.environ:
interactive = False
else:
# for some reason it bugs out shell tests in CI
register_tabcomplete()

if not interactive:
no_confirm = True
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_shell(name: str):
)
output = result.output.split("System")[-1]
# check for two 'yes' in output (both command and stdout)
assert output.count("yes") == 2
assert output.count("yes") == 2, result.output
assert result.exit_code == 0


Expand Down

0 comments on commit b02804b

Please sign in to comment.