Skip to content

Commit 75edde1

Browse files
feat: add behavioral and structural validation tests
- Add behavioral tests inheriting from amplifier-core - Add structural validation tests inheriting from amplifier-core - Update uv.lock to latest amplifier-core with test infrastructure - Add Makefile for standard test commands 🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier) Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
1 parent 6942561 commit 75edde1

6 files changed

Lines changed: 424 additions & 1 deletion

File tree

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Module Makefile
2+
# Provides test target for integration with parent make test
3+
4+
.PHONY: test install clean
5+
6+
test: ## Run validation tests
7+
@uv run pytest tests/ -v
8+
9+
install: ## Install module in editable mode
10+
@uv pip install -e .
11+
12+
clean: ## Clean build artifacts
13+
@rm -rf __pycache__ *.egg-info .pytest_cache
14+
@find . -type d -name "__pycache__" -exec rm -rf {{}} + 2>/dev/null || true

pyproject.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,13 @@ packages = [
3030

3131
[tool.hatch.metadata]
3232
allow-direct-references = true
33+
34+
[dependency-groups]
35+
dev = [
36+
"amplifier-core",
37+
"pytest>=8.0.0",
38+
"pytest-asyncio>=1.0.0",
39+
]
40+
41+
[tool.uv.sources]
42+
amplifier-core = { git = "https://github.com/microsoft/amplifier-core", branch = "main" }

tests/conftest.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"""
2+
Pytest configuration for module tests.
3+
4+
Behavioral tests use inheritance from amplifier-core base classes.
5+
See tests/test_behavioral.py for the inherited tests.
6+
7+
The amplifier-core pytest plugin provides fixtures automatically:
8+
- module_path: Detected path to this module
9+
- module_type: Detected type (provider, tool, hook, etc.)
10+
- provider_module, tool_module, etc.: Mounted module instances
11+
"""

tests/test_behavioral.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""Behavioral tests for basic orchestrator.
2+
3+
Inherits authoritative tests from amplifier-core.
4+
"""
5+
6+
from amplifier_core.validation.behavioral import OrchestratorBehaviorTests
7+
8+
9+
class TestBasicOrchestratorBehavior(OrchestratorBehaviorTests):
10+
"""Run standard orchestrator behavioral tests for basic.
11+
12+
All tests from OrchestratorBehaviorTests run automatically.
13+
Add module-specific tests below if needed.
14+
"""

tests/test_validation.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""Structural validation tests for loop-basic orchestrator.
2+
3+
Inherits authoritative tests from amplifier-core.
4+
"""
5+
6+
from amplifier_core.validation.structural import OrchestratorStructuralTests
7+
8+
9+
class TestLoopBasicOrchestratorStructural(OrchestratorStructuralTests):
10+
"""Run standard orchestrator structural tests for loop-basic.
11+
12+
All tests from OrchestratorStructuralTests run automatically.
13+
Add module-specific structural tests below if needed.
14+
"""

0 commit comments

Comments
 (0)