def test_hli_no_bg_invalid_solar_rad_number(self): """Test for invalid numerical value for solar radiation.""" with pytest.raises(ValueError, match=r".* -5.1 .*"): hli_no_bg(self.air_temp, self.r_hum, -5.1, self.w_speed)
def test_hli_no_bg_invalid_solar_rad_non_numeric(self): """Test for invalid non-numeric value for solar radiation.""" with pytest.raises(ValueError): hli_no_bg(self.air_temp, self.r_hum, 'invalid number', self.w_speed)
def test_hli_no_bg_invalid_rel_humidity_non_numeric(self): """Test for invalid non-numeric value for relative humidity.""" with pytest.raises(ValueError): hli_no_bg(self.air_temp, self.r_hum_invalid, self.solar_rad, self.w_speed)
def test_hli_no_bg_invalid_rel_humidity_number(self): """Test for invalid numerical value for relative humidity.""" with pytest.raises(ValueError, match=r".* -93 .*"): hli_no_bg(self.air_temp, self.r_hum_invalid, self.solar_rad, self.w_speed)
def test_hli_no_bg_invalid_wind_speed_non_numeric(self): """Test for invalid non-numeric value for wind speed.""" with pytest.raises(ValueError): hli_no_bg(self.air_temp, self.r_hum, self.solar_rad, self.w_speed_invalid_str)
def test_hli_no_bg_invalid_wind_speed_number(self): """Test heat load index no bg for invalid numerical value for wind speed.""" with pytest.raises(ValueError, match=r".* -12.9 .*"): hli_no_bg(self.air_temp, self.r_hum, self.solar_rad, self.w_speed_invalid)
def test_hli_no_bg_value_ok(self): """Test heat load index no black globe value.""" expected = pytest.approx(63.15, 0.1) got = hli_no_bg(self.air_temp, 66, self.solar_rad, 9.7) assert got == expected