1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-22 19:53:46 +01:00
This commit is contained in:
J. Nick Koston
2025-10-17 17:55:05 -10:00
parent 3151606d50
commit c70937ed01
6 changed files with 100 additions and 69 deletions

View File

@@ -39,6 +39,7 @@ from script.analyze_component_buses import (
merge_compatible_bus_groups,
uses_local_file_references,
)
from script.helpers import get_component_test_files
from script.merge_component_configs import merge_component_configs
@@ -100,10 +101,10 @@ def find_component_tests(
if not comp_dir.is_dir():
continue
# Find test files - either base only (test.*.yaml) or all (test[.-]*.yaml)
pattern = "test.*.yaml" if base_only else "test[.-]*.yaml"
for test_file in comp_dir.glob(pattern):
component_tests[comp_dir.name].append(test_file)
# Get test files using helper function
test_files = get_component_test_files(comp_dir.name, all_variants=not base_only)
if test_files:
component_tests[comp_dir.name] = test_files
return dict(component_tests)