Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/p4p/test/asynciotest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@
)

# we should never implicitly use the default loop.
asyncio.get_event_loop().close()
try:
loop = asyncio.get_event_loop()
except RuntimeError:
pass # no default loop exists (Python>=3.14)
else:
loop.close()

class AsyncMeta(type):
"""Automatically wrap and "async def test*():" methods for dispatch to self.loop
Expand Down