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()