def test_output_green_and_red_on_white_foreground():

    io = StringIO()
    couleur.proxy(io).enable()
    io.write("#{green}Hello #{white}#{on:red}Italy!\n")
    assert_equals('\033[32mHello \033[37;41mItaly!\n', io.getvalue())
    couleur.proxy(io).disable()
    io.seek(0)
    io.truncate()
    io.write("#{black}should not be translated\n")
    assert_equals('#{black}should not be translated\n', io.getvalue())
file-like filter output: green foreground and white on red background
dataset/ETHPy150Open gabrielfalcao/couleur/test_file_filter.py/test_output_green_and_red_on_white_foreground