在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:boralyl/github-custom-component-tutorial开源软件地址:https://github.com/boralyl/github-custom-component-tutorial开源编程语言:Python 100.0%开源软件介绍:Github Custom for Home AssistantAboutThis repo contains a custom component for Home Assistant that was created in a tutorial series on aarongodfrey.dev. The tutorial walks through the steps to create a custom component for use in Home Assistant.
What It IsAn integration that monitors GitHub repositories specified in a Running TestsTo run the test suite create a virtualenv (I recommend checking out pyenv and pyenv-virtualenv for this) and install the test requirements. $ pip install -r requirements.test.txt After the test dependencies are installed you can simply invoke $ pytest
Test session starts (platform: linux, Python 3.7.5, pytest 5.4.3, pytest-sugar 0.9.4)
rootdir: /home/aaron/projects/github-custom, inifile: setup.cfg, testpaths: tests
plugins: forked-1.3.0, timeout-1.4.2, cov-2.10.1, aiohttp-0.3.0, requests-mock-1.8.0, xdist-2.1.0, sugar-0.9.4, test-groups-1.0.3, homeassistant-custom-component-0.0.20
collecting ...
tests/test_config_flow.py ✓✓✓✓✓✓✓✓✓✓✓ 85% ████████▌
tests/test_sensor.py ✓✓ 100% ██████████
----------- coverage: platform linux, python 3.7.5-final-0 -----------
Name Stmts Miss Cover Missing
------------------------------------------------------------------------------
custom_components/__init__.py 0 0 100%
custom_components/github_custom/__init__.py 12 0 100%
custom_components/github_custom/config_flow.py 23 0 100%
custom_components/github_custom/const.py 18 0 100%
custom_components/github_custom/sensor.py 97 5 95% 86-89, 121
------------------------------------------------------------------------------
TOTAL 150 5 97%
Required test coverage of 93.0% reached. Total coverage: 96.67%
Results (0.73s):
13 passed |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论