Ejemplo n.º 1
0
def test_names():
    """Test colour names.
    """
    assert name_to_hex('red') == '#FF0000'
    assert name_to_hex('Red') == '#FF0000'
    assert hex_to_name('#FF0000') == 'red'
    assert hex_to_name('#ff0000') == 'red'
    assert hex_to_name('cerulean') is None
Ejemplo n.º 2
0
def test_names():
    assert name_to_hex('red') == '#FF0000'
    assert name_to_hex('Red') == '#FF0000'
    assert hex_to_name('#FF0000') == 'red'
    assert hex_to_name('#ff0000') == 'red'
    assert hex_to_name('cerulean') is None
Ejemplo n.º 3
0
def test_names():
    assert name_to_hex('red') == '#FF0000'
    assert name_to_hex('Red') == '#FF0000'  # case
    assert hex_to_name('#FF0000') == 'red'
    assert hex_to_name('#ff0000') == 'red'  # case
Ejemplo n.º 4
0
def test_names():
	assert name_to_hex('red') == '#FF0000'
	assert name_to_hex('Red') == '#FF0000'  # case
	assert hex_to_name('#FF0000') == 'red'
	assert hex_to_name('#ff0000') == 'red'  # case
Ejemplo n.º 5
0
def test_names():
    assert name_to_hex("red") == "#FF0000"
    assert name_to_hex("Red") == "#FF0000"
    assert hex_to_name("#FF0000") == "red"
    assert hex_to_name("#ff0000") == "red"
    assert hex_to_name("cerulean") is None