def test_exception_is_logged_when_returned_to_caller(self):
        try:
            self.actor_proxy.raise_exception().get()
            self.fail('Should raise exception')
        except Exception:
            pass
        self.log_handler.wait_for_message('debug')
        with self.log_handler.lock:
            self.assertEqual(1, len(self.log_handler.messages['debug']))
            log_record = self.log_handler.messages['debug'][0]
        self.assertEqual(
            self.actor_ref % 'Exception returned from %s to caller:',
            log_record.getMessage())
        self.assertEqual(Exception, log_record.exc_info[0])
        self.assertEqual('foo', str(log_record.exc_info[1]))
dataset/ETHPy150Open jodal/pykka/tests/logging_test.py/ActorLoggingTest.test_exception_is_logged_when_returned_to_caller/swapped operands of `%`