def test_lighten(self): c = HSL(10, 0.2, 0.2, 0.2) c2 = c.lighten(0.2) assert c2 is not c assert c2.a == 0.2 assert c2.h == 10 assert c2.s == 0.2 assert c2.l == 0.4 c2 = c.lighten(1.2) assert c2 is not c assert c2.a == 0.2 assert c2.h == 10 assert c2.s == 0.2 assert c2.l == 1.0
def test_darken(self): c = HSL(10, 0.2, 0.2, 0.2) c2 = c.darken(0.1) assert c2 is not c assert c2.a == 0.2 assert c2.h == 10 assert c2.s == 0.2 assert c2.l == 0.1 c2 = c.darken(0.3) assert c2 is not c assert c2.a == 0.2 assert c2.h == 10 assert c2.s == 0.2 assert c2.l == 0