From be8747c8ad54fa877a2c59113d8dd2cbbbd20b22 Mon Sep 17 00:00:00 2001 From: juk0de Date: Wed, 13 Sep 2023 14:59:29 +0200 Subject: [PATCH] question_cmd: now also accepts Messages as source files --- tests/test_question_cmd.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_question_cmd.py b/tests/test_question_cmd.py index b8e7874..b94560f 100644 --- a/tests/test_question_cmd.py +++ b/tests/test_question_cmd.py @@ -181,14 +181,15 @@ This is embedded source code. def test_single_question_with_message_and_embedded_code(self) -> None: self.args.ask = ["What is this?"] - self.args.source_text = [f"{self.chat.messages[1].file_path}"] + self.args.source_code = [f"{self.chat.messages[1].file_path}"] message = create_message(self.chat, self.args) self.assertIsInstance(message, Message) - # file contains no source code (only text) - # -> don't expect any in the question + # answer contains 1 source code block + # -> expect it in the question self.assertEqual(len(message.question.source_code()), 1) self.assertEqual(message.question, Question("""What is this? ``` It is embedded code -```""")) +``` +"""))