Skip to content

Commit 76450dd

Browse files
committed
Avoid more async warnings when running tests
1 parent 291088b commit 76450dd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/pyutils/test_is_awaitable.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ async def some_coroutine():
6666
assert not isawaitable(some_coroutine)
6767
assert not is_awaitable(some_coroutine)
6868

69+
@mark.asyncio
6970
@mark.filterwarnings("ignore:.* was never awaited:RuntimeWarning")
70-
def recognizes_a_coroutine_object():
71+
async def recognizes_a_coroutine_object():
7172
async def some_coroutine():
7273
return False # pragma: no cover
7374

@@ -83,8 +84,9 @@ def some_old_style_coroutine():
8384
assert is_awaitable(some_old_style_coroutine())
8485
assert is_awaitable(some_old_style_coroutine())
8586

87+
@mark.asyncio
8688
@mark.filterwarnings("ignore:.* was never awaited:RuntimeWarning")
87-
def recognizes_a_future_object():
89+
async def recognizes_a_future_object():
8890
async def some_coroutine():
8991
return False # pragma: no cover
9092

@@ -93,6 +95,7 @@ async def some_coroutine():
9395
assert is_awaitable(some_future)
9496
assert is_awaitable(some_future)
9597

98+
@mark.asyncio
9699
@mark.filterwarnings("ignore:.* was never awaited:RuntimeWarning")
97100
def declines_an_async_generator():
98101
async def some_async_generator():

0 commit comments

Comments
 (0)