rewrite phase 1
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import pytest
|
||||
|
||||
from agentci.domain.commands import CommandError, parse_command, resolve_job_kind
|
||||
from agentci.domain.models import CommandName, JobKind
|
||||
from agentci.engine.commands import CommandError, parse_command, resolve_job_kind
|
||||
from agentci.engine.model import CommandName, JobKind
|
||||
|
||||
|
||||
def test_ignores_non_commands() -> None:
|
||||
@@ -14,8 +14,7 @@ def test_all_commands_accept_messages_after_any_number_of_lines(
|
||||
name: CommandName, line_breaks: int
|
||||
) -> None:
|
||||
command = parse_command(
|
||||
f"/agent {name.value}{'\n' * line_breaks}"
|
||||
"focus on the API\nand add tests"
|
||||
f"/agent {name.value}{'\n' * line_breaks}focus on the API\nand add tests"
|
||||
)
|
||||
assert command is not None
|
||||
assert command.name is name
|
||||
@@ -26,10 +25,7 @@ def test_all_commands_accept_messages_after_any_number_of_lines(
|
||||
def test_all_commands_accept_crlf_separated_multiline_messages(
|
||||
name: CommandName,
|
||||
) -> None:
|
||||
command = parse_command(
|
||||
f"/agent {name.value}\r\n\r\n\r\n"
|
||||
"focus on the API\r\nand add tests"
|
||||
)
|
||||
command = parse_command(f"/agent {name.value}\r\n\r\n\r\nfocus on the API\r\nand add tests")
|
||||
assert command is not None
|
||||
assert command.name is name
|
||||
assert command.message == "focus on the API\r\nand add tests"
|
||||
|
||||
Reference in New Issue
Block a user