Did I find the right examples for you? yes no

All Samples(26)  |  Call(22)  |  Derive(0)  |  Import(4)

src/e/l/eliot-0.3.0/eliot/__init__.py   eliot(Download)
from ._action import startAction, startTask, Action
from ._output import ILogger, Logger, MemoryLogger
from ._validation import Field, MessageType, ActionType
from ._traceback import writeTraceback, writeFailure
addDestination = Logger._destinations.add

src/e/l/eliot-0.3.0/eliot/tests/test_testing.py   eliot(Download)
from .._action import startAction
from .._message import Message
from .._validation import ActionType, MessageType, ValidationError, Field
from .._traceback import writeTraceback
 
        specified L{ActionType}.
        """
        ACTION = ActionType("myaction", [], [], [], "An action!")
        logger = MemoryLogger()
        # index 0
        with startAction(logger, "test"):
            # index 1:
            with ACTION(logger):
        # index 4 - end action
        # index 5
        with ACTION(logger):
            pass
        # index 6 - end action
        logged = LoggedAction.ofType(logger.messages, ACTION)

src/e/l/eliot-0.3.0/eliot/tests/test_validation.py   eliot(Download)
from unittest import TestCase
 
from .._validation import (
    Field, MessageType, ActionType, ValidationError,
    _MessageSerializer,
    def actionType(self):
        """
        Return a L{ActionType} suitable for unit tests.
        """
        return ActionType("myapp:mysystem:myaction",
        """
        A = ActionType(
            "myapp:foo", [Field.forTypes("a", [int], "")], [], [], "")
        B = ActionType(
            "myapp:bar", [Field.forTypes("b", [int], "")], [], [], "")
 
        logger = MemoryLogger()
 
        with A(logger, a=1):

src/e/l/eliot-0.3.0/eliot/tests/test_action.py   eliot(Download)
    )
from .._output import MemoryLogger
from .._validation import ActionType, Field, _ActionSerializers
from ..testing import assertContainsFields
from .. import _action