You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
765 B
24 lines
765 B
"""Tests for agent pipeline control primitives."""
|
|
|
|
import pytest
|
|
|
|
pytest.importorskip("duckdb")
|
|
|
|
|
|
class TestPipelineRunStage:
|
|
def test_dry_run_returns_planned_actions(self, tmp_duckdb_path):
|
|
from agent_tools.pipeline import pipeline_run_stage
|
|
|
|
result = pipeline_run_stage(tmp_duckdb_path, stage="svd", window_id="2024", dry_run=True)
|
|
assert isinstance(result, dict)
|
|
assert "stage" in result
|
|
assert result.get("dry_run") is True
|
|
|
|
|
|
class TestPipelineGetLogs:
|
|
def test_returns_log_lines(self, tmp_duckdb_path):
|
|
from agent_tools.pipeline import pipeline_get_logs
|
|
|
|
result = pipeline_get_logs(tmp_duckdb_path, stage="svd", lines=10)
|
|
assert isinstance(result, list)
|
|
assert len(result) <= 10
|
|
|