Skip to content

Add pytest test coverage for Python example applications #219

@Artemon-line

Description

@Artemon-line

🚀 The feature, motivation and pitch

Overview

Add automated pytest testing for all Python examples in examples/ to ensure code quality and prevent regressions.

Current State

  • No existing tests or test infrastructure
  • Multiple untested apps: agents, agent_store, client_tools, DocQA, interior_design_assistant

Proposed Structure

tests/
├── conftest.py
├── unit/
│ ├── agents/
│ ├── client_tools/
│ └── agent_store/
└── integration/

Dependencies to Add

pytest>=7.4.0
pytest-cov>=4.1.0
pytest-asyncio>=0.21.0
pytest-mock>=3.11.1

Implementation

  • Mock external dependencies (Llama Stack server, API keys)
  • Target 70% code coverage for critical paths
  • Add pytest configuration (pytest.ini or pyproject.toml)
  • Create shared fixtures in conftest.py

Success Criteria

  • Test dependencies added to requirements
  • Test suite covering all example apps
  • All tests passing locally
  • Coverage report generated
  • Testing docs added to README

Alternatives

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions