Did I find the right examples for you? yes no

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/e/l/eliot-0.3.0/eliot/tests/test_action.py   eliot(Download)
        logger = MemoryLogger()
        action = Action(logger, "uuid", "/1/", "sys:me")
        action.finishAfter(d)
        self.assertFalse(logger.messages)
 
        action = Action(logger, "uuid", "/1/", "sys:me")
        action.addSuccessFields(x=2)
        action.finishAfter(d)
        d.callback("result")
        assertContainsFields(self, logger.messages[0],
        logger = MemoryLogger()
        action = Action(logger, "uuid", "/1/", "sys:me")
        action.finishAfter(d)
        d.callback("result")
        result = []
        action = Action(logger, "uuid", "/1/", "sys:me")
        action.addFailureFields(x=2)
        action.finishAfter(d)
        exception = RuntimeError("because")
        d.errback(exception)
        logger = MemoryLogger()
        action = Action(logger, "uuid", "/1/", "sys:me")
        action.finishAfter(d)
        failure = Failure(RuntimeError())
        d.errback(failure)