Exemple #1
0
def test_bg_lookup_nonexist():
    with pytest.raises(ValueError):
        ansi.bg_lookup('bar')
Exemple #2
0
def test_color_enum():
    assert ansi.fg_lookup('bright_red') == ansi.fg_lookup(ansi.fg.bright_red)
    assert ansi.bg_lookup('green') == ansi.bg_lookup(ansi.bg.green)
Exemple #3
0
def test_bg_lookup_exist():
    bg_color = 'green'
    assert ansi.bg_lookup(bg_color) == ansi.BG_COLORS[bg_color]
Exemple #4
0
def test_bg_lookup_exist():
    bg_color = 'red'
    assert ansi.bg_lookup(bg_color) == ansi.bg_lookup(ansi.bg.red)