Files
coorl-lost-cities/tests/games/classic/test_resources.py
T
coolguy 73fe7e2c94 GUI 선택 의존성 준비
맥락:
- pygame GUI 이식 전에 core 설치와 GUI 의존성을 분리하고 asset 로딩 경로를 고정한다.

변경:
- pyproject에 gui extra로 pygame과 pygame-gui를 추가했다.
- classic resource helper를 추가해 packaged asset 경로를 importlib.resources 기반으로 읽게 했다.
- theme asset resource 테스트와 README 설치 안내를 추가했다.

확인:
- uv sync --extra gui
- uv run pytest tests/games/classic
- uv run lost-cities-classic
2026-05-06 19:32:07 +09:00

16 lines
393 B
Python

from __future__ import annotations
import json
from coolrl_lost_cities.games.classic.resources import asset_path, theme_path
def test_theme_resource_is_packaged() -> None:
theme = json.loads(theme_path().read_text())
assert isinstance(theme, dict)
def test_asset_path_returns_named_asset() -> None:
assert asset_path("pygame_pvp_theme.json").name == "pygame_pvp_theme.json"