Drop last bits of asyncio.coroutine (#39280)

This commit is contained in:
Paulus Schoutsen 2020-08-26 16:57:52 +02:00 committed by GitHub
parent b47992dba0
commit 51a63c1fc4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 74 additions and 204 deletions

View file

@ -12,11 +12,10 @@ from tests.async_mock import Mock, patch
from tests.common import get_test_home_assistant
def mock_process_creator(error: bool = False) -> asyncio.coroutine:
def mock_process_creator(error: bool = False):
"""Mock a coroutine that creates a process when yielded."""
@asyncio.coroutine
def communicate() -> Tuple[bytes, bytes]:
async def communicate() -> Tuple[bytes, bytes]:
"""Mock a coroutine that runs a process when yielded.
Returns a tuple of (stdout, stderr).