mirror of
https://github.com/esphome/esphome.git
synced 2026-10-07 19:44:08 +00:00
Stop the false build_src_flags warning, share the idedata error tuple, make the no-tests guard per platform
This commit is contained in:
@@ -117,6 +117,7 @@ def clear_determine_jobs_caches() -> None:
|
||||
"""Clear all cached functions before each test."""
|
||||
determine_jobs._is_clang_tidy_full_scan.cache_clear()
|
||||
determine_jobs._component_has_tests.cache_clear()
|
||||
determine_jobs._cached_components_closure.cache_clear()
|
||||
|
||||
|
||||
def test_main_all_tests_should_run(
|
||||
|
||||
@@ -248,13 +248,18 @@ def test_components_empty_match_fails_with_flag(
|
||||
["logger"], "zz-none", "compile", False, fail_on_no_tests=True
|
||||
)
|
||||
assert rc == 1
|
||||
assert "No tests matched" in capsys.readouterr().out
|
||||
assert "No zz-none tests found" in capsys.readouterr().out
|
||||
|
||||
|
||||
def test_components_empty_match_tolerated_without_flag() -> None:
|
||||
"""The esp32-ard smoke leg deliberately builds only the subset with a
|
||||
matching fixture; without the flag an empty match stays green."""
|
||||
assert tbc.test_components(["logger"], "zz-none", "compile", False) == 0
|
||||
assert (
|
||||
tbc.test_components(
|
||||
["logger"], "zz-none", "compile", False, enable_grouping=False
|
||||
)
|
||||
== 0
|
||||
)
|
||||
|
||||
|
||||
def test_components_unknown_component_fails_with_flag(
|
||||
@@ -270,4 +275,7 @@ def test_components_unknown_component_fails_with_flag(
|
||||
fail_on_no_tests=True,
|
||||
)
|
||||
assert rc == 1
|
||||
assert "No tests found for requested component(s)" in capsys.readouterr().out
|
||||
assert (
|
||||
"No esp8266-ard tests found for requested component(s)"
|
||||
in capsys.readouterr().out
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user