From d2bc24cb181a59e7cab9b1e263dc34f00415828f Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Wed, 28 Aug 2024 16:01:10 -0700 Subject: [PATCH] fix: update test_get_command_completions to handle matching_commands return value --- tests/basic/test_io.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/basic/test_io.py b/tests/basic/test_io.py index c7e29185d..bbc467db5 100644 --- a/tests/basic/test_io.py +++ b/tests/basic/test_io.py @@ -169,6 +169,7 @@ class TestInputOutput(unittest.TestCase): commands = MagicMock() commands.get_commands.return_value = ["model", "chat", "help"] commands.get_completions.return_value = ["gpt-3.5-turbo", "gpt-4"] + commands.matching_commands.return_value = (["model"], None, None) autocompleter = AutoCompleter(root, rel_fnames, addable_rel_fnames, commands, "utf-8") @@ -176,6 +177,7 @@ class TestInputOutput(unittest.TestCase): result = autocompleter.get_command_completions("/model gpt", ["/model", "gpt"]) self.assertEqual(result, ["gpt-3.5-turbo", "gpt-4"]) commands.get_completions.assert_called_once_with("model") + commands.matching_commands.assert_called_once_with("/model") if __name__ == "__main__":