def test_wrong_values(): with pytest.raises(ValueError): rgb_to_hex((-1, 100, 100)) rgb_to_hex((100, 300, 200)) rgb_to_hex((100, 200, 256))
def test_rgb_to_hex(rgb, hex_): assert rgb_to_hex(rgb) == hex_