def test_failureFinishSerializer(self):
        serializers = ActionType("sys:thename", [],
                                 [Field("key", lambda x: x, "")],
                                 "")._serializers
        class Logger(list):
            def write(self, msg, serializer):
                self.append(serializer)
        logger = Logger()
        action = Action(logger, "unique", TaskLevel(level=[]), "sys:thename", serializers)
        action.finish(Exception())
        self.assertIs(logger[0], serializers.failure)
L{Action.finish} with an exception passes the failure
dataset/ETHPy150Open ClusterHQ/eliot/eliot/tests/test_action.py/ActionTests.test_failureFinishSerializer