From 7adcad1fad40b3a6d36b7f9f667a4d190d26f9d3 Mon Sep 17 00:00:00 2001 From: Sergey Makarov Date: Mon, 18 Nov 2024 00:57:27 +0300 Subject: [PATCH] errors correction --- .github/workflows/validate.yaml | 5 +---- requirements.txt | 3 +++ tests/conftest.py | 8 ++++++++ 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 requirements.txt create mode 100644 tests/conftest.py diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index 53e48f2..a929b5d 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -18,10 +18,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pytest pylint + pip install -r requirements.txt - name: Run tests run: | pytest - - name: Lint with pylint - run: | - pylint custom_components/ha_text_ai/*.py diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..6364ea1 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +pytest +pytest-asyncio +homeassistant diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..d3fe289 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,8 @@ +"""Common fixtures for tests.""" +import pytest +from homeassistant.core import HomeAssistant + +@pytest.fixture +def hass() -> HomeAssistant: + """Return a Home Assistant instance for testing.""" + return HomeAssistant()