feat: 지정 게임 용어집 추가 (워독스·배그·R6·에이펙스)
사용자가 필수로 지정한 게임 중 오버워치를 뺀 세 개가 빠져 있었다. - 레인보우 식스 시즈 67개 — 보강·하드브리치·앵커/로머·디퓨저·런아웃 - 배틀그라운드 66개 — 자기장·어부·낙하·파밍·3렙헬멧·스쿼드 콜 - 워치독스 59개 — 데드섹·ctOS·블룸·알비온 등 조직명과 해킹/잠입 용어 - 에이펙스 레전드 45개 — 링·배너·리스폰 비컨 (등등 항목으로 추가) 워치독스는 멀티 콜아웃이 아니라 스토리 대사가 주라, 번역기가 특히 잘 틀리는 고유명사(조직명)와 해킹 용어 위주로 골랐다. 전용 팩이 생긴 만큼 'FPS 공통' 설명을 장르 공통 콜로 좁혔다. 필수 게임이 빠지면 바로 잡히도록 test_required_games_are_bundled 추가. 번들 용어 304개 → 541개 (10개 팩) 검증: pytest 92개 통과, ruff clean Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,11 @@ from livesub.constants import LANGUAGE_CODES
|
||||
from livesub.models.glossary import Glossary, GlossaryEntry
|
||||
from livesub.models.packs import available_packs, build_glossary, get_pack
|
||||
|
||||
EXPECTED_PACKS = {"lol", "valorant", "overwatch", "fps-common", "minecraft", "streaming"}
|
||||
#: 사용자가 "필수 게임"으로 지정한 것 — 빠지면 테스트가 잡아낸다.
|
||||
REQUIRED_GAMES = {"overwatch", "watchdogs", "pubg", "r6siege"}
|
||||
EXPECTED_PACKS = REQUIRED_GAMES | {
|
||||
"lol", "valorant", "apex", "fps-common", "minecraft", "streaming",
|
||||
}
|
||||
|
||||
|
||||
def test_bundled_packs_are_loadable():
|
||||
@@ -14,6 +18,12 @@ def test_bundled_packs_are_loadable():
|
||||
assert keys >= EXPECTED_PACKS, f"빠진 팩: {EXPECTED_PACKS - keys}"
|
||||
|
||||
|
||||
def test_required_games_are_bundled():
|
||||
"""사용자가 직접 지정한 게임은 반드시 들어 있어야 한다."""
|
||||
keys = {p.key for p in available_packs()}
|
||||
assert keys >= REQUIRED_GAMES, f"필수 게임 팩 누락: {REQUIRED_GAMES - keys}"
|
||||
|
||||
|
||||
def test_every_pack_has_entries_and_metadata():
|
||||
for pack in available_packs():
|
||||
assert pack.name, pack.key
|
||||
@@ -43,13 +53,15 @@ def test_no_duplicate_sources_inside_a_pack():
|
||||
|
||||
|
||||
def test_known_terms_are_present():
|
||||
lol = get_pack("lol")
|
||||
sources = {e.source.casefold() for e in lol.entries}
|
||||
assert {"baron", "gank", "nexus", "ult"} <= sources
|
||||
def sources_of(key: str) -> set[str]:
|
||||
return {e.source.casefold() for e in get_pack(key).entries}
|
||||
|
||||
valorant = get_pack("valorant")
|
||||
sources = {e.source.casefold() for e in valorant.entries}
|
||||
assert {"spike", "defuse", "eco", "retake"} <= sources
|
||||
assert {"baron", "gank", "nexus", "ult"} <= sources_of("lol")
|
||||
assert {"spike", "defuse", "eco", "retake"} <= sources_of("valorant")
|
||||
assert {"drone", "anchor", "roamer", "defuser", "hard breach"} <= sources_of("r6siege")
|
||||
assert {"blue zone", "third party", "chicken dinner", "knocked"} <= sources_of("pubg")
|
||||
assert {"dedsec", "ctos", "blume", "backdoor"} <= sources_of("watchdogs")
|
||||
assert {"ring", "banner", "respawn beacon"} <= sources_of("apex")
|
||||
|
||||
|
||||
def test_get_pack_returns_none_for_unknown():
|
||||
|
||||
Reference in New Issue
Block a user