From a7a58fd28ab7b9ebd633210435729ca469a25feb Mon Sep 17 00:00:00 2001 From: Antonino Bertulla Date: Fri, 27 Dec 2024 11:46:15 +0100 Subject: [PATCH] Testing and Bumping 0.3.1 --- .gitignore | 8 ++++---- README.md | 9 +++++++++ requirements.test.txt | 4 +++- tests/__init__.py | 1 + tests/test_binary_sensor.py | 0 tests/test_init.py | 2 +- 6 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 tests/test_binary_sensor.py diff --git a/.gitignore b/.gitignore index d4b37ce..7e7bbb0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # artifacts __pycache__ +pyvenv.cfg .pytest* pytestdebug.log *.egg-info @@ -9,6 +10,9 @@ site/* # misc +bin +lib +lib64 .cache .coverage .ruff_cache @@ -19,9 +23,5 @@ site/* coverage.xml test_results/* - # Home Assistant configuration -config/* -!config/configuration.yaml -images/image.png venv/ \ No newline at end of file diff --git a/README.md b/README.md index 0a33dcf..ae12383 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,15 @@ python tools/inim_cli.py --username --password --password --list areas ``` +## Test + +```sh +pip install virtualenv # (if you don't already have virtualenv installed, see https://virtualenv.pypa.io/en/latest/installation.html) +virtualenv venv # to create your new environment (called 'venv' here) +source venv/bin/activate # to enter the virtual environment +pip install -r requirements.test.txt +``` + ## Disclaimer This project has no relation with the Inim company. diff --git a/requirements.test.txt b/requirements.test.txt index efeebaa..595fa83 100644 --- a/requirements.test.txt +++ b/requirements.test.txt @@ -1,3 +1,5 @@ +pyinim + pytest -pytest-cov==2.9.0 +pytest-cov==6.0.0 pytest-homeassistant-custom-component diff --git a/tests/__init__.py b/tests/__init__.py index e69de29..8d95eed 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1 @@ +"""Tests for the Minim Alarm component.""" \ No newline at end of file diff --git a/tests/test_binary_sensor.py b/tests/test_binary_sensor.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_init.py b/tests/test_init.py index bd67e00..2fb70d7 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -1,7 +1,7 @@ """Test component setup.""" from homeassistant.setup import async_setup_component -from custom_components.inim.const import DOMAIN +from custom_components.minim.const import DOMAIN async def test_async_setup(hass):