We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 82ff150 commit 90bc8caCopy full SHA for 90bc8ca
1 file changed
tests/test_asyncio.py
@@ -101,6 +101,17 @@ async def test_async_with_sync_passed_in_closed_in_async() -> None:
101
await aiozc.async_close()
102
103
104
+@pytest.mark.asyncio
105
+async def test_sync_within_event_loop_executor() -> None:
106
+ """Test sync version still works from an executor within an event loop."""
107
+ def sync_code():
108
+ zc = Zeroconf(interfaces=['127.0.0.1'])
109
+ assert zc.get_service_info("_neverused._tcp.local.", "xneverused._neverused._tcp.local.", 10) is None
110
+ zc.close()
111
+
112
+ await asyncio.get_event_loop().run_in_executor(None, sync_code)
113
114
115
@pytest.mark.asyncio
116
async def test_async_service_registration() -> None:
117
"""Test registering services broadcasts the registration by default."""
0 commit comments