feat: 피드 노을 카드도 결론·가장 붉을 때·쉬운 이유로, 노을 이유를 숫자 없는 쉬운 말로, 자세히에서 예보 모델 수 빼고 점수 뜻 설명, 노을 탭 오늘·주소 중복 칩 제거

This commit is contained in:
minaChoi committed 2026-10-12 10:09:09 +09:00
1 parent c30fac20a6
commit f5575711fe
10 files changed
+53 -42

No files matched your search

+1 -1
View File
@@ -52,7 +52,7 @@ async def test_sky_view_scores_three_days_with_spots(monkeypatch, clean):
assert 255 <= body["sunset_azimuth"] <= 280
plan = body["plan"]
assert plan["verdict"] == "go" and plan["headline"] == "나가 볼 만해요" and plan["when"] in ("오늘", "내일")
assert "알맞게" in plan["reason"]
assert "적당히" in plan["reason"]
assert plan["spot"]["name"] == "망원한강공원" and plan["best_at"]
assert [t["kind"] for t in plan["timeline"]] == ["golden", "sun", "peak", "blue"]
assert plan["situation_label"] == "구름이 알맞게 깔려 하늘이 넓게 물들어요" and plan["models_agree"] == plan["models_total"] == 2
+5 -5
View File
@@ -64,9 +64,9 @@ def test_sunset_best_times_order():
def test_reason_names_what_decided_the_score():
canvas = Layers(low=0, mid=20, high=50)
assert "알맞게" in reason(canvas, CLEAR)
assert "먼 하늘" in reason(canvas, Layers(low=90, mid=50, high=0))
assert "낮은 구름" in reason(Layers(100, 0, 0), CLEAR)
assert "적당히" in reason(canvas, CLEAR)
assert "멀리까지 구름이 끼어" in reason(canvas, Layers(low=90, mid=50, high=0))
assert "낮게 깔린 구름" in reason(Layers(100, 0, 0), CLEAR)
assert "거의 없어" in reason(CLEAR, CLEAR)
@@ -136,7 +136,7 @@ def test_hazy_air_lowers_verdict_and_says_why():
from services.sky_service import day_verdict
hazy = {"factor": 0.5, "visibility_km": 6.5, "humidity": 80}
assert air_note(hazy) == "공기가 뿌예 색이 흐려요 (가시거리 6.5km·습도 80%)"
assert air_note(hazy) == "먼 건물이 흐릿할 만큼 공기가 뿌옇고 습해서 노을 색이 바래 보일 거예요"
assert air_note({"factor": 0.9, "visibility_km": 30.0, "humidity": 60}) is None
glow = SimpleNamespace(situation=SkySituation.GLOW.value, score=29, air=hazy)
assert day_verdict(glow) == "maybe"
@@ -149,5 +149,5 @@ def test_plain_line_says_it_simply():
hazy = {"factor": 0.5, "visibility_km": 6.5, "humidity": 80}
assert plain_line(SkySituation.GLOW, None) == "구름이 알맞게 깔려 하늘이 넓게 물들어요"
assert plain_line(SkySituation.GLOW, hazy) == "구름은 좋은데 공기가 뿌예서 색이 흐릴 거예요"
assert plain_line(SkySituation.GLOW, hazy) == "구름은 좋은데 공기가 뿌예서 색이 바랠 거예요"
assert plain_line(SkySituation.FEW, hazy) == "구름이 거의 없어 짧고 은은하게 끝나요. 공기도 뿌예요"