Esempio n. 1
0
def test_color_rgb_int_cache():
    # this is tested as it is
    a = Color.rgb_int(1, 2, 3)
    b = Color.rgb_int(1, 2, 3)
    c = Color.rgb_int(1, 2, 4)
    assert id(a) == id(b)
    assert id(a) != id(c)
Esempio n. 2
0
def test_color_rgb_int():
    assert Color.rgb_int(1, 2, 3) == Color(1, 2, 3)