feat: 노을 탭 시안 A — 히어로에 결론·가장 붉을 때·쉬운 이유, 내일 안내 위로, 숫자는 자세히로, 시간표에 가장 붉을 때
This commit is contained in:
1 parent
8422829f9d
commit
c30fac20a6
7 files changed
+69
-45
No files matched your search
@@ -124,8 +124,8 @@ def test_sunrise_reason_and_timeline():
|
||||
|
||||
assert "해 뜨는 쪽" in reason(Layers(0, 0, 0), Layers(90, 50, 0), SkyType.SUNRISE)
|
||||
sun = sun_times(date(2026, 10, 8), 37.5, 127.0)
|
||||
rows = sunrise_timeline(sun.dawn_start_at, sun.sunrise_at, sun.golden_end_at)
|
||||
assert [r["kind"] for r in rows] == ["blue", "sun", "golden"]
|
||||
rows = sunrise_timeline(sun.dawn_start_at, sun.sunrise_at - timedelta(minutes=12), sun.sunrise_at, sun.golden_end_at)
|
||||
assert [r["kind"] for r in rows] == ["blue", "peak", "sun", "golden"]
|
||||
assert sun.dawn_start_at < sun.sunrise_at < sun.golden_end_at
|
||||
|
||||
|
||||
@@ -142,3 +142,12 @@ def test_hazy_air_lowers_verdict_and_says_why():
|
||||
assert day_verdict(glow) == "maybe"
|
||||
assert day_verdict(SimpleNamespace(situation=SkySituation.GLOW.value, score=60, air=None)) == "go"
|
||||
assert day_verdict(SimpleNamespace(situation=SkySituation.COVERED.value, score=10, air=hazy)) == "rest"
|
||||
|
||||
|
||||
def test_plain_line_says_it_simply():
|
||||
from services.calc.sky_score import plain_line
|
||||
|
||||
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.FEW, hazy) == "구름이 거의 없어 짧고 은은하게 끝나요. 공기도 뿌예요"
|
||||
Reference in new issue
Block a user