Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug fix and test improvements #2164

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

999AICoder
Copy link

Reworked imports for pygments MarkdownLexer to remove linter complaints

Reordered expections for two methods based on linter recommendations

Added new test cases to the tests/basic/test_io.py file to cover the add_to_input_history method of the InputOutput class. Specifically:

1 We imported the InMemoryHistory from prompt_toolkit.history to use in our tests.
2 We added two new test methods:
• test_add_to_input_history: This test checks if the method correctly adds input to both the file history and the in-memory history when fancy_input is True.
• test_add_to_input_history_no_prompt_session: This test ensures the method doesn't raise an exception when prompt_session is not initialized (when fancy_input is False).
3 In the aider/io.py file, we updated the add_to_input_history method to use self.prompt_session instead of self.session, fixing a linting issue and making the code consistent with the rest of the class.
4 All 11 tests in test_io.py are now passing, indicating that our changes are working as expected and haven't broken any existing functionality.

@CLAassistant
Copy link

CLAassistant commented Oct 26, 2024

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants