def test_output_colored_bold(self): color_code = '32' text = __pkgname__ actual = output_colored(color_code, text, is_bold=True) self.assertTrue(actual.startswith('\033[1;32')) self.assertIn(text, actual) self.assertTrue(actual.endswith('\033[0m'))
def test_output_colored_normal(self): color_code = '32' text = __pkgname__ actual = output_colored(color_code, text) self.assertTrue(actual.startswith('\033[32')) self.assertIn(text, actual) self.assertTrue(actual.endswith('\033[0m'))