Exemple #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
Exemple #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
Exemple #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
Exemple #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
Exemple #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