We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dee505e commit 2f02fbdCopy full SHA for 2f02fbd
tests/test_hypothesis_integration.py
@@ -1,6 +1,7 @@
1
"""Tests for the Hypothesis integration, which wraps async functions in a
2
sync shim for Hypothesis.
3
"""
4
+import asyncio
5
6
import pytest
7
@@ -25,3 +26,11 @@ async def test_mark_outer(n):
25
26
async def test_mark_and_parametrize(x, y):
27
assert x is None
28
assert y in (1, 2)
29
+
30
31
+@given(st.integers())
32
+@pytest.mark.asyncio
33
+async def test_can_use_fixture_provided_event_loop(event_loop, n):
34
+ semaphore = asyncio.Semaphore(value=0, loop=event_loop)
35
+ event_loop.call_soon(semaphore.release)
36
+ await semaphore.acquire()
0 commit comments