mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-16 01:40:15 +08:00
- Fixed '_GeneratorContextManager' error in pip_installer.py by using synchronous 'with' for constraints_file(). - Fixed 'CoroutineType' has no attribute 'is_file' in dashboard/routes/config.py by adding missing await. - Fixed undefined names (Group, ComponentTypes, File, Reply, At) in aiocqhttp_platform_adapter.py. - Added 'pytest-cov' for code coverage testing.
22 lines
492 B
Python
22 lines
492 B
Python
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
from astrbot.cli.commands.cmd_init import initialize_astrbot
|
|
|
|
|
|
@pytest.mark.asyncio
|
|
async def test_initialize_astrbot_creates_skills_dir(tmp_path: Path) -> None:
|
|
await initialize_astrbot(
|
|
tmp_path,
|
|
yes=True,
|
|
backend_only=True,
|
|
admin_username=None,
|
|
admin_password=None,
|
|
)
|
|
|
|
assert (tmp_path / ".astrbot").exists()
|
|
assert (tmp_path / "data" / "skills").is_dir()
|