We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f97d0aa commit b0c9b08Copy full SHA for b0c9b08
effect/test_fold.py
@@ -63,15 +63,15 @@ def test_fold_effect_errors():
63
assert excinfo.value.wrapped_exception[0] is ZeroDivisionError
64
assert str(excinfo.value.wrapped_exception[1]) == 'foo'
65
66
+
67
def test_fold_effect_str():
68
+ """str()ing a FoldError returns useful traceback/exception info."""
69
effs = [Effect('a'), Effect(Error(ZeroDivisionError('foo'))), Effect('c')]
-
70
dispatcher = SequenceDispatcher([
71
('a', lambda i: 'Ei'),
72
])
73
74
eff = fold_effect(operator.add, 'Nil', effs)
75
with dispatcher.consume():
76
with raises(FoldError) as excinfo:
77
sync_perform(_base_and(dispatcher), eff)
0 commit comments