mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
test: update reasoning tag tests to use imported constants
This commit is contained in:
parent
ac1c05389a
commit
c78b3e0204
1 changed files with 9 additions and 9 deletions
|
@ -5,7 +5,7 @@ from aider.coders.base_coder import Coder
|
|||
from aider.dump import dump # noqa
|
||||
from aider.io import InputOutput
|
||||
from aider.models import Model
|
||||
from aider.reasoning_tags import remove_reasoning_content
|
||||
from aider.reasoning_tags import remove_reasoning_content, REASONING_START, REASONING_END
|
||||
|
||||
|
||||
class TestReasoning(unittest.TestCase):
|
||||
|
@ -52,8 +52,8 @@ class TestReasoning(unittest.TestCase):
|
|||
dump(output)
|
||||
|
||||
# Output should contain formatted reasoning tags
|
||||
self.assertIn("Thinking ...", output)
|
||||
self.assertIn("... done thinking", output)
|
||||
self.assertIn(REASONING_START, output)
|
||||
self.assertIn(REASONING_END, output)
|
||||
|
||||
# Output should include both reasoning and main content
|
||||
self.assertIn(reasoning_content, output)
|
||||
|
@ -157,9 +157,9 @@ class TestReasoning(unittest.TestCase):
|
|||
final_text = update_calls[-1][0][0]
|
||||
|
||||
# The final text should include both reasoning and main content with proper formatting
|
||||
self.assertIn("> Thinking ...", final_text)
|
||||
self.assertIn(REASONING_START, final_text)
|
||||
self.assertIn("My step-by-step reasoning process", final_text)
|
||||
self.assertIn("> ... done thinking", final_text)
|
||||
self.assertIn(REASONING_END, final_text)
|
||||
self.assertIn("Final answer after reasoning", final_text)
|
||||
|
||||
# Ensure proper order: reasoning first, then main content
|
||||
|
@ -225,8 +225,8 @@ class TestReasoning(unittest.TestCase):
|
|||
dump(output)
|
||||
|
||||
# Output should contain formatted reasoning tags
|
||||
self.assertIn("Thinking ...", output)
|
||||
self.assertIn("... done thinking", output)
|
||||
self.assertIn(REASONING_START, output)
|
||||
self.assertIn(REASONING_END, output)
|
||||
|
||||
# Output should include both reasoning and main content
|
||||
self.assertIn(reasoning_content, output)
|
||||
|
@ -330,9 +330,9 @@ class TestReasoning(unittest.TestCase):
|
|||
final_text = update_calls[-1][0][0]
|
||||
|
||||
# The final text should include both reasoning and main content with proper formatting
|
||||
self.assertIn("> Thinking ...", final_text)
|
||||
self.assertIn(REASONING_START, final_text)
|
||||
self.assertIn("My step-by-step reasoning process", final_text)
|
||||
self.assertIn("> ... done thinking", final_text)
|
||||
self.assertIn(REASONING_END, final_text)
|
||||
self.assertIn("Final answer after reasoning", final_text)
|
||||
|
||||
# Ensure proper order: reasoning first, then main content
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue