forked from cleveragents/cleveragents-core
Core Module Unit Tests
Tests for the src/cleveragents/core/ module.
Test Files
test_tool_command_processing.py
Source: src/cleveragents/core/application.py - _process_tool_commands() method
Tests:
- Regex pattern matching for
[TOOL_EXECUTE:tool_name]commands - Simple tool parameter extraction
- Nested JSON structure handling
- Complex multi-level JSON from real workflows
- Multiple tool commands in single response
Run: python -m tests.unit.core.test_tool_command_processing
test_json_sanitization.py
Source: src/cleveragents/core/application.py - _sanitize_json_string() method
Tests:
- JSON sanitization for malformed LLM output
- Control character handling
- Valid JSON preservation
Run: pytest tests/unit/core/test_json_sanitization.py
Module Coverage
This directory should contain unit tests for all classes and functions in src/cleveragents/core/:
- ✅
application.py- Tool command processing, JSON sanitization - ⏳
application.py- ReactiveCleverAgentsApp initialization, configuration loading - ⏳
config.py- Configuration management - ⏳
exceptions.py- Custom exceptions - ⏳
sandbox.py- Sandbox execution
Legend: ✅ Has tests | ⏳ Needs tests