mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
- Add 100+ new test files covering provider sources, platform adapters, agent runners, star/plugin system, knowledge base, core utils, pipeline, computer tools, builtin commands, and dashboard routes - Fix Python type errors in sqlite.py (col() wrappers for SQLModel), astr_agent_tool_exec, core_lifecycle, star context/manager - Fix TypeScript strict mode errors across 30+ dashboard Vue files - Add import smoke tests, auth roundtrip, startup tests - Add compile-all check and CLI entry test for AUR compatibility - Restore BotMessageAccumulator and helpers lost in merge
32 lines
1000 B
Python
32 lines
1000 B
Python
"""Tests for astrbot.core.pipeline.scheduler module."""
|
|
|
|
from unittest.mock import MagicMock
|
|
|
|
import pytest
|
|
|
|
from astrbot.core.pipeline.scheduler import PipelineScheduler
|
|
from astrbot.core.pipeline.context import PipelineContext
|
|
|
|
|
|
class TestPipelineScheduler:
|
|
"""Smoke tests for PipelineScheduler."""
|
|
|
|
def test_module_import(self):
|
|
"""Verify the scheduler module can be imported."""
|
|
import astrbot.core.pipeline.scheduler # noqa: F811
|
|
assert hasattr(
|
|
astrbot.core.pipeline.scheduler,
|
|
"PipelineScheduler",
|
|
)
|
|
|
|
def test_class_exists(self):
|
|
"""Verify PipelineScheduler class exists."""
|
|
assert PipelineScheduler.__name__ == "PipelineScheduler"
|
|
|
|
def test_init_requires_context(self):
|
|
"""Verify PipelineScheduler init requires PipelineContext."""
|
|
ctx = MagicMock(spec=PipelineContext)
|
|
scheduler = PipelineScheduler(ctx)
|
|
assert scheduler.ctx is ctx
|
|
assert scheduler.stages == []
|