Exemple #1
0
def test_get_yellow(s):
    assert get_yellow(s) == "\033[3%sm%s\033[0m" % (3, implements_to_unicode(s))
Exemple #2
0
def test_get_green(s):
    assert get_green(s) == "\033[3%sm%s\033[0m" % (2, implements_to_unicode(s))
Exemple #3
0
def test_get_red(s):
    assert get_red(s) == "\033[3%sm%s\033[0m" % (1, implements_to_unicode(s))
Exemple #4
0
def test_color(c, s):
    assert get_color(c, s) == "\033[3%sm%s\033[0m" % (c, implements_to_unicode(s))
Exemple #5
0
def test_pprint_error(s, capsys):
    print_error(s)
    captured = capsys.readouterr()
    assert captured.out == "\033[3%sm%s\033[0m\n" % (1, implements_to_unicode(s))
Exemple #6
0
def test_print_text(s, capsys):
    print_text(s)
    captured = capsys.readouterr()
    assert captured.out == implements_to_unicode(s) + "\n"