Merge pull request #308 from goodboy/sort_subs_results_infected_aio

Sort `.subscribe()` results before comparison in test
include_readme
goodboy 2022-04-12 20:06:55 -04:00 committed by GitHub
commit 62983684d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 6 deletions

View File

@ -281,12 +281,7 @@ async def stream_from_aio(
# ``.subscribe()`` fan out case. # ``.subscribe()`` fan out case.
doubled = list(itertools.chain(*zip(expect, expect))) doubled = list(itertools.chain(*zip(expect, expect)))
expect = doubled[:len(pulled)] expect = doubled[:len(pulled)]
if pulled != expect: assert list(sorted(pulled)) == expect
print(
f'uhhh pulled is {pulled}\n',
f'uhhh expect is {expect}\n',
)
assert pulled == expect
else: else:
assert pulled == expect assert pulled == expect