def test_printer_interface(self): uut = ColorPrinter() with self.assertRaises(NotImplementedError): uut.print("test") with self.assertRaises(NotImplementedError): uut.print("test", color="green")
def __init__(self, print_colored=None): """ Instantiates a new ConsolePrinter. :param print_colored: Whether to print with colors or not. If None use colors if supported. """ ColorPrinter.__init__(self, print_colored) colorama.init()
def __init__(self, print_colored=None): """ Instantiates a new ConsolePrinter. :param print_colored: Whether to print with colors or not. If None use colors if supported. """ ColorPrinter.__init__(self, print_colored) if not ConsolePrinter.colorama_initialized: colorama.init() ConsolePrinter.colorama_initialized = True
def __init__(self, print_colored=platform.system() in ("Linux",)): ColorPrinter.__init__(self, print_colored)