def test_invalid_string(self): with self.assertRaises(ValueError): hue('lol')
def test_invalid_min(self): with self.assertRaises(ValueError): hue(-1)
def test_invalid_max(self): with self.assertRaises(ValueError): hue(65536)
def test_valid_float(self): self.assertEqual(hue(2.3), 2)
def test_valid_float_cut(self): self.assertEqual(hue(2.9), 2)
def test_valid_max_string(self): self.assertEqual(hue('65535'), 65535)
def test_valid_min_string(self): self.assertEqual(hue('0'), 0)
def test_valid_max(self): self.assertEqual(hue(65535), 65535)
def test_valid_normal(self): self.assertEqual(hue(100), 100)
def test_valid_min(self): self.assertEqual(hue(0), 0)