mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
style: Format test_sendchat.py with consistent newlines
This commit is contained in:
parent
eb879a743e
commit
de788266eb
1 changed files with 6 additions and 0 deletions
|
@ -96,18 +96,21 @@ class TestSendChat(unittest.TestCase):
|
|||
|
||||
def test_ensure_alternating_roles_empty(self):
|
||||
from aider.sendchat import ensure_alternating_roles
|
||||
|
||||
messages = []
|
||||
result = ensure_alternating_roles(messages)
|
||||
assert result == []
|
||||
|
||||
def test_ensure_alternating_roles_single_message(self):
|
||||
from aider.sendchat import ensure_alternating_roles
|
||||
|
||||
messages = [{"role": "user", "content": "Hello"}]
|
||||
result = ensure_alternating_roles(messages)
|
||||
assert result == messages
|
||||
|
||||
def test_ensure_alternating_roles_already_alternating(self):
|
||||
from aider.sendchat import ensure_alternating_roles
|
||||
|
||||
messages = [
|
||||
{"role": "user", "content": "Hello"},
|
||||
{"role": "assistant", "content": "Hi there"},
|
||||
|
@ -118,6 +121,7 @@ class TestSendChat(unittest.TestCase):
|
|||
|
||||
def test_ensure_alternating_roles_consecutive_user(self):
|
||||
from aider.sendchat import ensure_alternating_roles
|
||||
|
||||
messages = [
|
||||
{"role": "user", "content": "Hello"},
|
||||
{"role": "user", "content": "Are you there?"},
|
||||
|
@ -132,6 +136,7 @@ class TestSendChat(unittest.TestCase):
|
|||
|
||||
def test_ensure_alternating_roles_consecutive_assistant(self):
|
||||
from aider.sendchat import ensure_alternating_roles
|
||||
|
||||
messages = [
|
||||
{"role": "assistant", "content": "Hi there"},
|
||||
{"role": "assistant", "content": "How can I help?"},
|
||||
|
@ -146,6 +151,7 @@ class TestSendChat(unittest.TestCase):
|
|||
|
||||
def test_ensure_alternating_roles_mixed_sequence(self):
|
||||
from aider.sendchat import ensure_alternating_roles
|
||||
|
||||
messages = [
|
||||
{"role": "user", "content": "Hello"},
|
||||
{"role": "user", "content": "Are you there?"},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue