36 lines
1.5 KiB
Gherkin
36 lines
1.5 KiB
Gherkin
Feature: Agents base uncovered lines
|
|
As a developer
|
|
I want Behave tests for agents/base.py
|
|
So that uncovered lines are executed and verified
|
|
|
|
Background:
|
|
Given a basic test agent setup
|
|
|
|
Scenario: Processing pipeline schedules the process wrapper
|
|
When I patch asyncio create_task and send a message
|
|
Then the processing pipeline should schedule the process wrapper task
|
|
|
|
Scenario: Process wrapper handles tuple input and emits result
|
|
When I process a tuple message through the wrapper
|
|
Then the tuple message and context should be passed and emitted
|
|
|
|
Scenario: Process wrapper handles non-tuple input with empty context
|
|
When I process a non tuple message through the wrapper
|
|
Then the non tuple message should be processed with empty context
|
|
|
|
Scenario: Process wrapper wraps exceptions with ExecutionError
|
|
When process_message raises an error inside the wrapper
|
|
Then an ExecutionError should be raised with the agent name
|
|
|
|
Scenario: process_message_sync runs coroutine on the event loop
|
|
When I call process_message_sync on the agent
|
|
Then the synchronous result should match the async process output
|
|
|
|
Scenario: Dispose cleans up streams that expose dispose
|
|
When I call dispose on an agent with disposable streams
|
|
Then both input and output streams should be disposed if available
|
|
|
|
Scenario: AgentWithMemory stores and recalls values with its lock
|
|
When I remember a value and recall it later
|
|
Then the remembered value should be returned from memory
|