mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-23 13:54:59 +00:00
do not package tests/
This commit is contained in:
parent
7ece31c08a
commit
0860e7b30d
15 changed files with 1 additions and 1 deletions
36
tests/test_help.py
Normal file
36
tests/test_help.py
Normal file
|
@ -0,0 +1,36 @@
|
|||
import unittest
|
||||
|
||||
from aider.help import Help, install_help_extra
|
||||
from aider.io import InputOutput
|
||||
|
||||
|
||||
class TestHelp(unittest.TestCase):
|
||||
def setUp(self):
|
||||
io = InputOutput(yes=True)
|
||||
install_help_extra(io)
|
||||
|
||||
def test_init(self):
|
||||
help_inst = Help()
|
||||
self.assertIsNotNone(help_inst.retriever)
|
||||
|
||||
def test_ask_without_mock(self):
|
||||
help_instance = Help()
|
||||
question = "What is aider?"
|
||||
result = help_instance.ask(question)
|
||||
|
||||
self.assertIn(f"# Question: {question}", result)
|
||||
self.assertIn("<doc", result)
|
||||
self.assertIn("</doc>", result)
|
||||
self.assertGreater(len(result), 100) # Ensure we got a substantial response
|
||||
|
||||
# Check for some expected content (adjust based on your actual help content)
|
||||
self.assertIn("aider", result.lower())
|
||||
self.assertIn("ai", result.lower())
|
||||
self.assertIn("chat", result.lower())
|
||||
|
||||
# Assert that there are more than 5 <doc> entries
|
||||
self.assertGreater(result.count("<doc"), 5)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
Loading…
Add table
Add a link
Reference in a new issue