Did I find the right examples for you? yes no

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

src/e/l/eliot-0.3.0/eliot/tests/test_action.py   eliot(Download)
    twisted = None
 
from .._action import (
    Action, _ExecutionContext, currentAction, startTask, startAction,
    )
        logger = MemoryLogger()
        serializers = _ActionSerializers(None, None, None)
        action = startAction(logger, "sys:do", serializers)
        self.assertIs(action._serializers, serializers)
 
        """
        logger = MemoryLogger()
        action = startAction(logger, "sys:do")
        self.assertIsInstance(action, Action)
        self.assertEqual(action._identification["task_level"], "/")
        """
        logger = MemoryLogger()
        action = startAction(logger, "sys:do", key="value")
        assertContainsFields(self, logger.messages[0],
                             {"task_uuid": action._identification["task_uuid"],
        parent = Action(logger, "uuid", "/2/", "other:thing")
        with parent:
            action = startAction(logger, "sys:do")
            self.assertIsInstance(action, Action)
            self.assertEqual(action._identification["task_uuid"], "uuid")

src/e/l/eliot-0.3.0/eliot/__init__.py   eliot(Download)
# Expose the public API:
from ._message import Message
from ._action import startAction, startTask, Action
from ._output import ILogger, Logger, MemoryLogger
from ._validation import Field, MessageType, ActionType

src/e/l/eliot-0.3.0/eliot/tests/test_testing.py   eliot(Download)
    )
from .._output import MemoryLogger
from .._action import startAction
from .._message import Message
from .._validation import ActionType, MessageType, ValidationError, Field
        """
        logger = MemoryLogger()
        with startAction(logger, "test"):
            pass
        logged = self.fromMessagesIndex(logger.messages, 0)
        logger = MemoryLogger()
        Message.new(x=1).write(logger)
        with startAction(logger, "test"):
            Message.new(x=1).write(logger)
        # Now we should have x message, start action message, another x message
        logger = MemoryLogger()
        try:
            with startAction(logger, "test"):
                raise KeyError()
        except KeyError:
        """
        logger = MemoryLogger()
        with startAction(logger, "test"):
            pass
        self.assertRaises(ValueError,

src/e/l/eliot-0.3.0/eliot/tests/test_message.py   eliot(Download)
from .._message import Message, _defaultAction
from .._output import MemoryLogger
from .._action import Action, startAction
 
 
        logger = MemoryLogger()
        msg = Message.new(key=2)
        with startAction(logger, "sys:thename"):
            for i in range(4):
                msg.write(logger)

src/e/l/eliot-0.3.0/eliot/tests/test_validation.py   eliot(Download)
    _MessageSerializer,
    )
from .._action import startAction, startTask
from .._output import MemoryLogger
from ..serializers import identity