def test_valid_aes_colors(): assert is_valid_aesthetic('red', 'color') assert is_valid_aesthetic('#FF0000', 'color') assert is_valid_aesthetic('#FF000080', 'color') assert is_valid_aesthetic((1, 0, 0), 'color') assert is_valid_aesthetic((1, 0, 0), 'color') assert is_valid_aesthetic((1, 0, 0, 0.5), 'color')
def test_valid_aes_linetypes(): assert is_valid_aesthetic('solid', 'linetype') assert is_valid_aesthetic('--', 'linetype') assert not is_valid_aesthetic('tada', 'linetype') assert is_valid_aesthetic((0, (3, 2)), 'linetype') assert not is_valid_aesthetic((0, (3, 2.0)), 'linetype') assert not is_valid_aesthetic((0, (3, 2, 1)), 'linetype')
def test_valid_aes_shapes(): assert is_valid_aesthetic('o', 'shape') assert is_valid_aesthetic((4, 1, 45), 'shape') assert not is_valid_aesthetic([4, 1, 45], 'shape')