Skip to content

Commit

Permalink
better test
Browse files Browse the repository at this point in the history
  • Loading branch information
zzstoatzz committed Jun 20, 2024
1 parent b59e41e commit 5f8c911
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/public/flows/test_previously_awaited_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ async def get_some_numbers_new_way():
len(w) == N * 2 + 4
) # 1 submit, 1 wait, 1 result, 1 map, N waits, N results
assert issubclass(w[0].category, DeprecationWarning)
assert "please remove the `await` keyword" in str(w[0].message)
assert all(
"please remove the `await` keyword" in str(warning.message)
for warning in w
if warning.category is DeprecationWarning
)

# Test the new way (without await)
with warnings.catch_warnings(record=True) as w:
Expand Down

0 comments on commit 5f8c911

Please sign in to comment.