fix: 초단기예보 강수형태 5 빗방울·6 빗방울눈날림·7 눈날림을 몰라 KeyError 로 피드가 500 — 비·진눈깨비·눈으로 읽음, 테스트가 실제 초단기예보를 부르던 것 막음
This commit is contained in:
1 parent
d020d27715
commit
4daad2ecc5
3 files changed
+15
-1
No files matched your search
@@ -72,3 +72,13 @@ def test_ieyo_particle():
|
||||
assert ieyo("환기") == "환기예요"
|
||||
assert ieyo("야장각") == "야장각이에요"
|
||||
assert ieyo("아아→뜨아") == "아아→뜨아예요"
|
||||
|
||||
|
||||
def test_parse_ultra_reads_drizzle_codes():
|
||||
"""초단기예보에만 있는 5 빗방울 · 6 빗방울눈날림 · 7 눈날림."""
|
||||
items = [
|
||||
{"fcstDate": "20261013", "fcstTime": f"{h:02d}00", "category": c, "fcstValue": v}
|
||||
for h, pty in ((10, "5"), (11, "6"), (12, "7"))
|
||||
for c, v in [("PTY", pty), ("RN1", "1mm 미만"), ("T1H", "17")]
|
||||
]
|
||||
assert [p["rain_type"] for p in parse_ultra(items)] == [RainType.RAIN, RainType.SLEET, RainType.SNOW]
|
||||
Reference in new issue
Block a user