Skip to content

Commit e3ec312

Browse files
seifertmTinche
authored andcommitted
Adjusted Hypothesis integration test to use the same event loop initialization as in the plugin.
The plugin code creates a new event loop from the current event loop policy, whereas the fixture in the Hypothesis test uses get_event_loop. In Python 3.10 the use of get_event_loop was deprecated and causes the Hypothesis tests to fail. Signed-off-by: Michael Seifert <[email protected]>
1 parent 29a4265 commit e3ec312

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_hypothesis_integration.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010

1111
@pytest.fixture(scope="module")
1212
def event_loop():
13-
loop = asyncio.get_event_loop()
13+
loop = asyncio.get_event_loop_policy().new_event_loop()
1414
yield loop
15+
loop.close()
1516

1617

1718
@given(st.integers())

0 commit comments

Comments
 (0)