def test_rgba_vs_rgb_conflict(): with pytest.raises(ValueError): colors.color_to_rgb('#949494E8')
def test_illegal4(): with pytest.raises(ValueError): colors.color_to_rgb((0, 0, 256))
def test_illegal5(): with pytest.raises(ValueError): colors.color_to_rgb((256, 0, 0))
def test_illegal2(): with pytest.raises(ValueError): colors.color_to_rgb((1, 2, 3, 256))
def test_illegal3(): with pytest.raises(ValueError): colors.color_to_rgb((300, 300, 300))
def test_illegal(): with pytest.raises(ValueError): colors.color_to_rgb('unknown')
def test_valid_hexcodes_rgb(name, expected): rgb = colors.color_to_rgb(name) assert 3 == len(rgb) assert expected == rgb
def test_illegal5(): with pytest.raises(ValueError): colors.color_to_rgb((256, 0, 0))
def test_rgba_vs_rgb_conflict(): with pytest.raises(ValueError): colors.color_to_rgb('#949494E8')
def test_illegal4(): with pytest.raises(ValueError): colors.color_to_rgb((0, 0, 256))
def test_illegal3(): with pytest.raises(ValueError): colors.color_to_rgb((300, 300, 300))
def test_illegal2(): with pytest.raises(ValueError): colors.color_to_rgb((1, 2, 3, 256))
def test_valid_hexcodes_rgb(name, expected): rgb = colors.color_to_rgb(name) assert 3 == len(rgb) assert expected == rgb
def test_illegal(): with pytest.raises(ValueError): colors.color_to_rgb('unknown')