def test_log_info(self):
        d = asyncore.dispatcher()

        # capture output of dispatcher.log_info() (to stdout via print)
        fp = StringIO()
        stdout = sys.stdout
        l1 = "Have you got anything without spam?"
        l2 = "Why can't she have egg bacon spam and sausage?"
        l3 = "THAT'S got spam in it!"
        try:
            sys.stdout = fp
            d.log_info(l1, 'EGGS')
            d.log_info(l2)
            d.log_info(l3, 'SPAM')
        finally:
            sys.stdout = stdout

        lines = fp.getvalue().splitlines()
        expected = [l1 % 'EGGS: %s', 'info: %s' % l2, 'SPAM: %s' % l3]

        self.assertEqual(lines, expected)
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/test/test_asyncore.py/DispatcherTests.test_log_info/swapped operands of `%`