def test_voc_good_upper(self): metric = AQI.calculateMetric(0, 0, 199) self.assertEqual(metric[2], 1)
def test_humidity_top_bad_lower(self): metric = AQI.calculateMetric(0, 70.1, 0) self.assertEqual(metric[1], -0.01)
def test_humidity_top_bad_dropoff(self): metric = AQI.calculateMetric(0, 80, 0) self.assertEqual(metric[1], -1)
def test_humidity_bottom_bad_dropoff(self): metric = AQI.calculateMetric(0, 19.9, 0) self.assertEqual(metric[1], -1)
def test_humidity_top_acceptable_upper(self): metric = AQI.calculateMetric(0, 69.9, 0) self.assertEqual(metric[1], 0.01)
def test_humidity_bottom_acceptable_upper(self): metric = AQI.calculateMetric(0, 39.9, 0) self.assertEqual(metric[1], 0.99)
def test_humidity_good(self): metric = AQI.calculateMetric(0, 50, 0) self.assertEqual(metric[1], 1)
def test_temperature_top_good_upper(self): metric = AQI.calculateMetric(24.9, 0, 0) self.assertEqual(metric[0], 1)
def test_temperature_top_acceptable_lower(self): metric = AQI.calculateMetric(25.1, 0, 0) self.assertEqual(metric[0], 0.95)
def test_temperature_bottom_good_lower(self): metric = AQI.calculateMetric(23.1, 0, 0) self.assertEqual(metric[0], 1)
def test_temperature_good(self): metric = AQI.calculateMetric(24, 0, 0) self.assertEqual(metric[0], 1)
def test_temperature_bottom_good_boundary(self): metric = AQI.calculateMetric(23, 0, 0) self.assertEqual(metric[0], 1)
def test_temperature_bottom_acceptable_upper(self): metric = AQI.calculateMetric(22.9, 0, 0) self.assertEqual(metric[0], 0.95)
def test_temperature_bottom_acceptable_lower(self): metric = AQI.calculateMetric(21.1, 0, 0) self.assertEqual(metric[0], 0.05)
def test_humidity_bottom_acceptable_boundary(self): metric = AQI.calculateMetric(0, 30, 0) self.assertEqual(metric[1], 0)
def test_temperature_top_acceptable_upper(self): metric = AQI.calculateMetric(26.9, 0, 0) self.assertEqual(metric[0], 0.05)
def test_humidity_bottom_acceptable_lower(self): metric = AQI.calculateMetric(0, 30.1, 0) self.assertEqual(metric[1], 0.01)
def test_temperature_bottom_bad_dropoff(self): metric = AQI.calculateMetric(19.9, 0, 0) self.assertEqual(metric[0], -1)
def test_humidity_bottom_good_lower(self): metric = AQI.calculateMetric(0, 40.1, 0) self.assertEqual(metric[1], 1)
def test_temperature_top_bad_boundary(self): metric = AQI.calculateMetric(27, 0, 0) self.assertEqual(metric[0], 0)
def test_humidity_top_good_upper(self): metric = AQI.calculateMetric(0, 59.9, 0) self.assertEqual(metric[1], 1)
def test_temperature_top_bad_upper(self): metric = AQI.calculateMetric(27.9, 0, 0) self.assertEqual(metric[0], -0.9)
def test_humidity_top_acceptable_lower(self): metric = AQI.calculateMetric(0, 60.1, 0) self.assertEqual(metric[1], 0.99)
def test_temperature_top_bad_dropoff(self): metric = AQI.calculateMetric(28, 0, 0) self.assertEqual(metric[0], -1)
def test_humidity_top_bad_boundary(self): metric = AQI.calculateMetric(0, 70, 0) self.assertEqual(metric[1], 0)
def test_humidity_bottom_bad_lower(self): metric = AQI.calculateMetric(0, 20.1, 0) self.assertEqual(metric[1], -0.99)
def test_humidity_top_bad_upper(self): metric = AQI.calculateMetric(0, 79.9, 0) self.assertEqual(metric[1], -0.99)
def test_humidity_bottom_bad_upper(self): metric = AQI.calculateMetric(0, 29.9, 0) self.assertEqual(metric[1], -0.01)
def test_humidity_bottom_bad_boundary(self): metric = AQI.calculateMetric(0, 20, 0) self.assertEqual(metric[1], -1)
def test_voc_good_bottom(self): metric = AQI.calculateMetric(0, 0, 1) self.assertEqual(metric[2], 1)