forked from goodboy/tractor
1
0
Fork 0

WIP prints to debug frickin windows

aio_explicit_task_cancels
Tyler Goodlet 2022-04-12 16:13:33 -04:00
parent 597ae4b690
commit c7aab75dc3
1 changed files with 9 additions and 4 deletions

View File

@ -280,14 +280,19 @@ async def stream_from_aio(
# we get double the pulled values in the # we get double the pulled values in the
# ``.subscribe()`` fan out case. # ``.subscribe()`` fan out case.
doubled = list(itertools.chain(*zip(expect, expect))) doubled = list(itertools.chain(*zip(expect, expect)))
if pulled != doubled[:len(pulled)]: expect = doubled[:len(pulled)]
print(f'uhhh pulled is {pulled}') if list(sorted(pulled)) != expect:
assert pulled == doubled[:len(pulled)] print(
f'uhhh pulled is {pulled}\n',
f'uhhh expect is {expect}\n',
)
assert pulled == expect
else: else:
assert pulled == expect assert pulled == expect
else: else:
# if fan_out: assert not fan_out
assert pulled == expect[:51] assert pulled == expect[:51]
print('trio guest mode task completed!') print('trio guest mode task completed!')