def test_color_multiple_lines(self): expected = textwrap.dedent('''\ \x1b[1;32mHere is some text \x1b[1;0m\x1b[1;32mThat is on multiple lines \x1b[1;0m\x1b[1;32mthree lines to be exact.\x1b[1;0m''') assert in_color('green', self.multi_line) == expected
def test_color_one_line(self): assert in_color('green', self.single_line) == '\x1b[1;32mHere is a single line of text.\x1b[1;0m'
def test_color_one_line(self): assert in_color( 'green', self.single_line ) == '\x1b[1;32mHere is a single line of text.\x1b[1;0m'