Skip to content

Commit dc65112

Browse files
committed
document test
1 parent 034565c commit dc65112

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/test_core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,14 +278,15 @@ def on_service_state_change(zeroconf, service_type, state_change, name):
278278
browser = ServiceBrowser(zc, "_http._tcp.local.", [on_service_state_change])
279279
browser.cancel()
280280

281+
await asyncio.sleep(0) # flush out any call_soon_threadsafe
281282
assert notify_called
282283
zc.remove_notify_listener(notify_listener)
283284

284285
notify_called = 0
285286
# start a browser
286287
browser = ServiceBrowser(zc, "_http._tcp.local.", [on_service_state_change])
287288
browser.cancel()
288-
await asyncio.sleep(0)
289+
await asyncio.sleep(0) # flush out any call_soon_threadsafe
289290

290291
assert not notify_called
291292

0 commit comments

Comments
 (0)