Skip to content

Commit 7bbc23c

Browse files
committed
Test error raises correctly
1 parent 57edd4a commit 7bbc23c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

tests/test_cooldown.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
shared_cooldown,
1313
)
1414
from cooldowns.buckets import _HashableArguments
15-
from cooldowns.exceptions import CallableOnCooldown
15+
from cooldowns.exceptions import CallableOnCooldown, NonExistent
1616

1717

1818
@pytest.mark.asyncio
@@ -300,3 +300,9 @@ async def test_3(*args, **kwargs):
300300

301301
with pytest.raises(CallableOnCooldown):
302302
await test_3(1, 2)
303+
304+
with pytest.raises(NonExistent):
305+
306+
@shared_cooldown("r_2")
307+
async def test_4():
308+
pass

0 commit comments

Comments
 (0)