adaptive-lighting/test_dependencies.py
Benjamin Auquite 06dcdbb4a4
Fix the broken tests (#467)
* Update test_dependencies.py

pytest reversion todo in later commit

* increase verbosity for analysis

* "instance" was created in the basic features PR.

* Can't stand the deprecation warnings.

* add testing steps to workflow action in logs.

Help the next person running into this issue again.

* wording in new messages.

* Manifest keys should be sorted: domain, name, then alphabetical order

* return basnijholt's original settings.

replaced `-v` with `-qq` again in `pytest.yaml`,
returned `branches: [master]` in both yaml files.

* Forgot a comma

* Update version in manifest to 1.6.0

* @th3w1zard1 is a code owner!

* Update .gitignore

* Revert "Update .gitignore"

This reverts commit 172841d356.
2023-03-26 15:04:13 -07:00

32 lines
828 B
Python

with open("core/requirements_test_all.txt") as f:
lines = f.readlines()
components = []
packages = []
deps = {}
for i, line in enumerate(lines):
line = line.strip()
if line.startswith("# homeassistant."):
component = line.split("# homeassistant.")[1]
components.append(component)
elif components and line:
packages.append(line)
else:
for component in components:
for package in packages:
deps.setdefault(component, []).append(package)
components = []
packages = []
required = [
"components.recorder",
"components.mqtt",
"components.zeroconf",
"components.http",
"components.stream",
"components.conversation",
]
to_install = []
for r in required:
to_install.extend(deps[r])
print(" ".join(to_install))