File tree 2 files changed +9
-1
lines changed
Filter options
2 files changed +9
-1
lines changed
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ def build(setup_kwargs: Any) -> None:
25
25
[
26
26
"src/zeroconf/_dns.py" ,
27
27
"src/zeroconf/_cache.py" ,
28
+ "src/zeroconf/_listener.py" ,
28
29
"src/zeroconf/_protocol/incoming.py" ,
29
30
"src/zeroconf/_protocol/outgoing.py" ,
30
31
],
Original file line number Diff line number Diff line change 15
15
from typing import cast
16
16
from unittest .mock import patch
17
17
18
+ if sys .version_info [:3 ][1 ] < 8 :
19
+ from unittest .mock import Mock
20
+
21
+ AsyncMock = Mock
22
+ else :
23
+ from unittest .mock import AsyncMock
24
+
18
25
import pytest
19
26
20
27
import zeroconf as r
@@ -669,7 +676,7 @@ def _background_register():
669
676
@pytest .mark .asyncio
670
677
@unittest .skipIf (sys .version_info [:3 ][1 ] < 8 , 'Requires Python 3.8 or later to patch _async_setup' )
671
678
@patch ("zeroconf._core._STARTUP_TIMEOUT" , 0 )
672
- @patch ("zeroconf._core.AsyncEngine._async_setup" )
679
+ @patch ("zeroconf._core.AsyncEngine._async_setup" , new_callable = AsyncMock )
673
680
async def test_event_loop_blocked (mock_start ):
674
681
"""Test we raise NotRunningException when waiting for startup that times out."""
675
682
aiozc = AsyncZeroconf (interfaces = ['127.0.0.1' ])
You can’t perform that action at this time.
0 commit comments