Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fd6313f

Browse filesBrowse files
committed
fix: test
1 parent 502c30d commit fd6313f
Copy full SHA for fd6313f

File tree

2 files changed

+7
-3
lines changed
Filter options

2 files changed

+7
-3
lines changed

‎src/zeroconf/_handlers.pxd

Copy file name to clipboardExpand all lines: src/zeroconf/_handlers.pxd
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ from ._protocol.outgoing cimport DNSOutgoing
88

99

1010
cdef object RecordUpdate
11-
cdef object _DNS_PTR_MIN_TTL
1211

1312
cdef class QueryHandler:
1413

‎tests/test_core.py

Copy file name to clipboardExpand all lines: tests/test_core.py
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
from typing import Set, cast
1717
from unittest.mock import patch
1818

19+
try:
20+
from unittest.mock import AsyncMock
21+
except ImportError:
22+
from unittest.mock import Mock as AsyncMock # type: ignore[misc]
23+
1924
import pytest
2025

2126
import zeroconf as r
@@ -818,8 +823,8 @@ def _background_register():
818823
@pytest.mark.asyncio
819824
@unittest.skipIf(sys.version_info[:3][1] < 8, 'Requires Python 3.8 or later to patch _async_setup')
820825
@patch("zeroconf._core._STARTUP_TIMEOUT", 0)
821-
@patch("zeroconf._core.AsyncEngine._async_setup")
822-
async def test_event_loop_blocked(mock_start):
826+
@patch("zeroconf._core.AsyncEngine._async_setup", AsyncMock())
827+
async def test_event_loop_blocked():
823828
"""Test we raise NotRunningException when waiting for startup that times out."""
824829
aiozc = AsyncZeroconf(interfaces=['127.0.0.1'])
825830
with pytest.raises(NotRunningException):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.