From f90ffcf3b8e434d89d1ad60ca171e3708f78d7fd Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Thu, 29 Jul 2021 16:09:16 +0200 Subject: [PATCH] Also run black/isort on tests (#82) --- .github/workflows/ci.yml | 4 ++-- tests/test_client.py | 2 +- tests/test_connection.py | 2 +- tests/test_host_resolver.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1b57af..e216271 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,9 +61,9 @@ jobs: if: ${{ matrix.id == 'flake8' }} - run: pylint aioesphomeapi if: ${{ matrix.id == 'pylint' }} - - run: black --check --diff --color aioesphomeapi + - run: black --check --diff --color aioesphomeapi tests if: ${{ matrix.id == 'black' }} - - run: isort --check --diff aioesphomeapi + - run: isort --check --diff aioesphomeapi tests if: ${{ matrix.id == 'isort' }} - run: mypy aioesphomeapi if: ${{ matrix.id == 'mypy' }} diff --git a/tests/test_client.py b/tests/test_client.py index 90c9656..11754f7 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -1,7 +1,7 @@ from sys import version -from mock import MagicMock, AsyncMock, call, patch import pytest +from mock import AsyncMock, MagicMock, call, patch from aioesphomeapi.api_pb2 import ( BinarySensorStateResponse, diff --git a/tests/test_connection.py b/tests/test_connection.py index fc49ea7..1939887 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -1,8 +1,8 @@ import asyncio import socket -from mock import AsyncMock, MagicMock, Mock, patch import pytest +from mock import AsyncMock, MagicMock, Mock, patch from aioesphomeapi.api_pb2 import ConnectResponse, HelloResponse from aioesphomeapi.connection import APIConnection, ConnectionParams diff --git a/tests/test_host_resolver.py b/tests/test_host_resolver.py index e1cc260..6ccb05f 100644 --- a/tests/test_host_resolver.py +++ b/tests/test_host_resolver.py @@ -1,7 +1,7 @@ import socket -from mock import AsyncMock, MagicMock, patch import pytest +from mock import AsyncMock, MagicMock, patch import aioesphomeapi.host_resolver as hr from aioesphomeapi.core import APIConnectionError