Skip to content

Commit 7aebe8d

Browse files
committed
fix up imports so the tests can be run
1 parent 7954d1c commit 7aebe8d

2 files changed

Lines changed: 22 additions & 14 deletions

File tree

txeffect/__init__.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@
2222
from twisted.python.failure import Failure
2323
from twisted.internet.task import deferLater
2424

25-
from ._intents import Delay, ParallelEffects
26-
from ._base import perform as base_perform
27-
from ._dispatcher import TypeDispatcher
28-
from ._utils import wraps
29-
from .async import perform_parallel_async
25+
from effect import (
26+
Delay,
27+
ParallelEffects,
28+
perform as base_perform,
29+
TypeDispatcher)
30+
from effect.async import perform_parallel_async
31+
from effect._utils import wraps # whoah there
3032

3133

3234
def deferred_to_box(d, box):

txeffect/test_txeffect.py

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,26 @@
1111
from twisted.internet.task import Clock
1212
from twisted.python.failure import Failure
1313

14-
from ._base import Effect
15-
from ._intents import (
16-
Constant,
17-
Delay,
18-
base_dispatcher,
19-
parallel)
20-
from ._dispatcher import ComposedDispatcher
21-
from .twisted import (
14+
from effect import (
15+
Constant, Delay, Effect,
16+
base_dispatcher, parallel,
17+
ComposedDispatcher,
18+
)
19+
from . import (
2220
deferred_performer,
2321
exc_info_to_failure,
2422
make_twisted_dispatcher,
2523
perform)
2624

27-
from .test_base import func_dispatcher
25+
26+
def func_dispatcher(intent):
27+
"""
28+
Simple effect dispatcher that takes callables taking a box,
29+
and calls them with the given box.
30+
"""
31+
def performer(dispatcher, intent, box):
32+
intent(box)
33+
return performer
2834

2935

3036
def _dispatcher(reactor):

0 commit comments

Comments
 (0)