Flip a last `MultiError` to a beg, add todo on `@stream` func
parent
60aa16adf6
commit
b209990d04
|
@ -246,10 +246,10 @@ def test_simple_context(
|
|||
trio.run(main)
|
||||
except error_parent:
|
||||
pass
|
||||
except trio.MultiError as me:
|
||||
except BaseExceptionGroup as beg:
|
||||
# XXX: on windows it seems we may have to expect the group error
|
||||
from tractor._exceptions import is_multi_cancelled
|
||||
assert is_multi_cancelled(me)
|
||||
assert is_multi_cancelled(beg)
|
||||
else:
|
||||
trio.run(main)
|
||||
|
||||
|
|
|
@ -38,10 +38,13 @@ async def async_gen_stream(sequence):
|
|||
assert cs.cancelled_caught
|
||||
|
||||
|
||||
# TODO: deprecated either remove entirely
|
||||
# or re-impl in terms of `MsgStream` one-sides
|
||||
# wrapper, but at least remove `Portal.open_stream_from()`
|
||||
@tractor.stream
|
||||
async def context_stream(
|
||||
ctx: tractor.Context,
|
||||
sequence
|
||||
sequence: list[int],
|
||||
):
|
||||
for i in sequence:
|
||||
await ctx.send_yield(i)
|
||||
|
|
Loading…
Reference in New Issue