Skip to content

Commit

Permalink
style: Format test_sendchat.py with consistent newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-gauthier committed Jan 24, 2025
1 parent eb879a7 commit de78826
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/basic/test_sendchat.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,21 @@ def test_simple_send_non_retryable_error(self, mock_print, mock_completion):

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"},
Expand All @@ -118,6 +121,7 @@ def test_ensure_alternating_roles_already_alternating(self):

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?"},
Expand All @@ -132,6 +136,7 @@ def test_ensure_alternating_roles_consecutive_user(self):

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?"},
Expand All @@ -146,6 +151,7 @@ def test_ensure_alternating_roles_consecutive_assistant(self):

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?"},
Expand Down

0 comments on commit de78826

Please sign in to comment.