Skip to content

test: comprehensive V2 unit tests for tools, vision, knowledge, providers#23

Merged
DeepRatAI merged 6 commits intomainfrom
test/v2-unit-tests
Feb 26, 2026
Merged

test: comprehensive V2 unit tests for tools, vision, knowledge, providers#23
DeepRatAI merged 6 commits intomainfrom
test/v2-unit-tests

Conversation

@DeepRatAI
Copy link
Owner

Summary

Adds 144 new unit tests across 4 new test files covering all major V2 modules. Replaces the broken V1 test_tools.py (25/33 failed) with a fully V2-aligned test_tools_v2.py.

Changes

New Test Files

File Tests Module Covered
test_tools_v2.py 63 ToolParameter, ToolDefinition, ToolCall, ToolResult, ToolError, ToolRegistry, ToolExecutor, medical tools (drug interactions, dosage, labs, emergency), enums
test_vision.py 16 ImageAnalyzer (validation, extensions, size limits), ImagingModality enum, ImageValidation dataclass
test_knowledge.py 31 MedicalCondition, Medication, DiagnosticProcedure, ClinicalProtocol, MedicalKnowledgeBase, DrugMonograph, DrugInteraction, InteractionSeverity, RouteOfAdministration, PharmaceuticalDatabase
test_providers.py 34 ProviderConfig (API key resolution), ProviderResponse (success property), ProviderStatus enum, ModelProvider (status management, error classification), ProviderManager

Removed

  • tests/test_tools.py — broken V1 test file with 25/33 failures due to API mismatches (replaced by test_tools_v2.py)

CI Updates

  • Required tests: 4 → 8 files (test_tools_v2, test_vision, test_knowledge, test_providers added)
  • Extended tests: new files added to ignore list (avoids double-running)
  • Total required test count: 136 existing + 144 new = 280 tests

Testing

  • All 144 new tests pass locally on Python 3.12
  • Lint clean (ruff + black)
  • All 136 existing required tests unaffected

Closes #1

Gonzalo

@DeepRatAI DeepRatAI added enhancement New feature or request v2-architecture labels Feb 26, 2026
@DeepRatAI DeepRatAI added this to the v0.1.1 - Patch milestone Feb 26, 2026
@DeepRatAI DeepRatAI merged commit 6bdcd3b into main Feb 26, 2026
7 checks passed
@DeepRatAI DeepRatAI deleted the test/v2-unit-tests branch February 26, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request v2-architecture

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add comprehensive unit tests for V2 modules

1 participant