Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions build_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def build(setup_kwargs: Any) -> None:
[
"src/zeroconf/_dns.py",
"src/zeroconf/_cache.py",
"src/zeroconf/_listener.py",
"src/zeroconf/_protocol/incoming.py",
"src/zeroconf/_protocol/outgoing.py",
],
Expand Down
9 changes: 8 additions & 1 deletion tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
from typing import cast
from unittest.mock import patch

if sys.version_info[:3][1] < 8:
from unittest.mock import Mock

AsyncMock = Mock
else:
from unittest.mock import AsyncMock

import pytest

import zeroconf as r
Expand Down Expand Up @@ -669,7 +676,7 @@ def _background_register():
@pytest.mark.asyncio
@unittest.skipIf(sys.version_info[:3][1] < 8, 'Requires Python 3.8 or later to patch _async_setup')
@patch("zeroconf._core._STARTUP_TIMEOUT", 0)
@patch("zeroconf._core.AsyncEngine._async_setup")
@patch("zeroconf._core.AsyncEngine._async_setup", new_callable=AsyncMock)
async def test_event_loop_blocked(mock_start):
"""Test we raise NotRunningException when waiting for startup that times out."""
aiozc = AsyncZeroconf(interfaces=['127.0.0.1'])
Expand Down