mirror of
https://github.com/esphome/esphome.git
synced 2026-10-14 10:12:52 +00:00
[core] Add YAML discovery, secret and zstd helpers
Report unresolved includes and load errors from include discovery, share the !secret reference scan between bundle and other callers, let callers register extra secret values for a dump and see which names it emitted, swap secrets in the !extend, !remove and scalar !include representers, record the remote sources packages fetch, and move zstd_module out of the api wizard into esphome.helpers.
This commit is contained in:
@@ -212,10 +212,9 @@ async def yaml_config(request: pytest.FixtureRequest, unused_tcp_port: int) -> s
|
||||
loop = asyncio.get_running_loop()
|
||||
content = await loop.run_in_executor(None, read_file, fixture_path)
|
||||
|
||||
# Replace the port in the config if it contains api section
|
||||
if "api:" in content:
|
||||
# Add port configuration after api:
|
||||
content = content.replace("api:", f"api:\n port: {unused_tcp_port}")
|
||||
# Replace the port in the config if it contains an api section. Anchored to
|
||||
# the start of a line so keys that merely end in "api:" are left alone.
|
||||
content = re.sub(r"(?m)^api:", f"api:\n port: {unused_tcp_port}", content)
|
||||
|
||||
# Add debug build flags for integration tests to enable assertions
|
||||
if "esphome:" in content and "build_flags:" not in content:
|
||||
|
||||
Reference in New Issue
Block a user