This change update the entire structure to support testing and building. Specifically:
Encapsulates all the code in custom_components module (it's a standard in HA)
Imports HASS fixtures to run tests locally, using simply pytest. These fixtures may need to be updated from time to time, but it's the best way to ensure the project is still mergeable in homeassistant/core
Adds pyproject.toml to properly define project dependencies and dev dependencies
Uses econnect-python==0.5.1 (latest version)
Testing:
Tests can be executed using:
pytest tests/ --cov custom_components -v
Extra Notes (optional):
n/a
Checklist
[x] Related issues and proposed changes are filled
[x] Tests are defining the correct and expected behavior
Related Issues
Proposed Changes:
This change update the entire structure to support testing and building. Specifically:
custom_components
module (it's a standard in HA)pytest
. These fixtures may need to be updated from time to time, but it's the best way to ensure the project is still mergeable inhomeassistant/core
pyproject.toml
to properly define project dependencies and dev dependencieseconnect-python==0.5.1
(latest version)Testing:
Tests can be executed using:
Extra Notes (optional):
n/a
Checklist