def test_suck_report_freezing_windy(cls): weather = Weather(clouds=100, dt=0, humidity=0, rain=0, temp=Temp(min=-10, max=-5), wind=Wind(speed=20, deg=270)) score = SuckReport.create(weather, 90).total assert is_approximately(score, 18)
def test_suck_report_ideal_rainy(cls): weather = Weather(clouds=100, dt=0, humidity=0, rain=1.5, temp=Temp(min=18, max=22), wind=Wind(speed=0, deg=90)) score = SuckReport.create(weather, 90).total assert is_approximately(score, 12)
def test_suck_report_incredible(cls): weather = Weather(clouds=0, dt=0, humidity=0, rain=0, temp=Temp(min=18, max=22), wind=Wind(speed=10, deg=90)) score = SuckReport.create(weather, 90).total assert is_approximately(score, -1, delta=1)
def test_suck_report_hot_humid_rainy(cls): weather = Weather(clouds=100, dt=0, humidity=100, rain=2, temp=Temp(min=30, max=35), wind=Wind(speed=0, deg=90)) score = SuckReport.create(weather, 90).total assert is_approximately(score, 20)
def calc(travel_direction): return SuckReport.create(weather, travel_direction).total