feat: 노을 점수 맑은 하늘 55점으로 올리고 공기 보정은 아주 뿌옇거나 습한 날만 깎도록 완화
This commit is contained in:
1 parent
3e376ae4b8
commit
cd6769ccef
4 files changed
+12
-12
No files matched your search
@@ -160,7 +160,7 @@ def test_score_rows_apply_air_at_sunset_and_keep_cloud_score_without_air():
|
||||
hourly = {("R", hour): SimpleNamespace(humidity=90, rain_prob=0)}
|
||||
om = {("R", sky_service._nearest_slot(hour)): SimpleNamespace(visibility_m=5000)}
|
||||
hazy = sky_service._score_rows(region, today, clouds, now, hourly, om)[0]["score"]
|
||||
assert hazy == round(plain * 0.6 * 0.75)
|
||||
assert hazy == round(plain * 0.8 * 0.85)
|
||||
rain = {("R", hour - timedelta(hours=3)): SimpleNamespace(humidity=50, rain_prob=80), ("R", hour): SimpleNamespace(humidity=50, rain_prob=10)}
|
||||
assert sky_service._score_rows(region, today, clouds, now, rain, {})[0]["score"] == min(100, round(plain * 1.15))
|
||||
|
||||
|
||||
@@ -26,9 +26,9 @@ def test_score_rises_steadily_with_a_few_clouds():
|
||||
|
||||
def test_air_factor_hazy_humid_lowers_and_clearing_rain_raises():
|
||||
assert air_factor(Air()) == 1.0
|
||||
assert air_factor(Air(visibility_km=40, humidity=50)) == 1.0
|
||||
assert air_factor(Air(visibility_km=5)) == 0.6 and air_factor(Air(humidity=90)) == 0.75
|
||||
assert 0.6 < air_factor(Air(visibility_km=30)) < 1.0
|
||||
assert air_factor(Air(visibility_km=20, humidity=70)) == 1.0
|
||||
assert air_factor(Air(visibility_km=5)) == 0.8 and air_factor(Air(humidity=90)) == 0.85
|
||||
assert 0.8 < air_factor(Air(visibility_km=12.5)) < 1.0
|
||||
assert air_factor(Air(rain_before=70, rain_now=10)) == 1.15
|
||||
assert air_factor(Air(rain_before=70, rain_now=60)) == 1.0 # 아직 비 오는 중이면 가산 없음
|
||||
|
||||
|
||||
Reference in new issue
Block a user