def test_colorful_output(self, capsys):
        colors.use_color = 4
        class NotSoSimpleApp(cli.Application):
            PROGNAME = colors.blue | "NSApp"
            VERSION = "1.2.3"
            COLOR_GROUPS = {'Switches': colors.green}

            @cli.switch(["b"], help="this is a bacon switch")
            def bacon(self):
                print("Oooooh, I love BACON!")

            @cli.switch(["c"], help=colors.red | "crunchy")
            def crunchy(self):
                print("Crunchy...")

            def main(self):
                print("Eating!")

        _, rc = NotSoSimpleApp.run(["NotSoSimpleApp", "-h"], exit=False)
        output = capsys.readouterr()[0]
        assert rc == 0
        expected = str((colors.blue | "NSApp") + " 1.2.3") 
        assert "-b" in output
        assert str(colors.red | "crunchy") in output
        assert expected in output
dataset/ETHPy150Open tomerfiliba/plumbum/tests/test_clicolor.py/TestNSApp.test_colorful_output/original