Files
AstrBot/tests/test_star_manager.py
LIghtJUNction dcaaf6286a test: comprehensive test coverage and type fixes
- 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
2026-04-29 06:29:56 +08:00

34 lines
1.0 KiB
Python

"""Import smoke tests for astrbot.core.star.star_manager."""
from astrbot.core.star.star_manager import (
PluginManager,
PluginVersionIncompatibleError,
PluginDependencyInstallError,
)
def test_plugin_version_incompatible_error():
"""PluginVersionIncompatibleError is importable and instantiable."""
exc = PluginVersionIncompatibleError("test")
assert isinstance(exc, Exception)
assert str(exc) == "test"
def test_plugin_dependency_install_error():
"""PluginDependencyInstallError is importable and instantiable."""
try:
raise ValueError("oh no")
except ValueError as e:
exc = PluginDependencyInstallError(
plugin_label="my_plugin",
requirements_path="/path/to/requirements.txt",
error=e,
)
assert isinstance(exc, Exception)
assert exc.plugin_label == "my_plugin"
assert exc.requirements_path == "/path/to/requirements.txt"
def test_plugin_manager_class():
"""PluginManager is importable and is a class."""
assert isinstance(PluginManager, type)