mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
refactor: move retry_exceptions import to top of test file
This commit is contained in:
parent
0fb79917ff
commit
513f06be46
1 changed files with 1 additions and 4 deletions
|
@ -4,7 +4,7 @@ from unittest.mock import MagicMock, patch
|
||||||
import httpx
|
import httpx
|
||||||
|
|
||||||
from aider.llm import litellm
|
from aider.llm import litellm
|
||||||
from aider.sendchat import simple_send_with_retries
|
from aider.sendchat import retry_exceptions, simple_send_with_retries
|
||||||
|
|
||||||
|
|
||||||
class PrintCalled(Exception):
|
class PrintCalled(Exception):
|
||||||
|
@ -14,9 +14,6 @@ class PrintCalled(Exception):
|
||||||
class TestSendChat(unittest.TestCase):
|
class TestSendChat(unittest.TestCase):
|
||||||
def test_retry_exceptions(self):
|
def test_retry_exceptions(self):
|
||||||
"""Test that retry_exceptions() can be called without raising errors"""
|
"""Test that retry_exceptions() can be called without raising errors"""
|
||||||
# ai! imports to top
|
|
||||||
from aider.sendchat import retry_exceptions
|
|
||||||
|
|
||||||
retry_exceptions() # Should not raise any exceptions
|
retry_exceptions() # Should not raise any exceptions
|
||||||
|
|
||||||
@patch("litellm.completion")
|
@patch("litellm.completion")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue