INNER CODE UNIT · Python

run_tests

dummylabs/thewatchman · scripts/test_ha.py:8

def run_tests(ha_version, pytest_args):
    """Run tests for a specific HA version using uv."""
    if ha_version:
        print(f"--- Preparing environment for Home Assistant {ha_version} ---")
    else:
        print("--- Running tests using locked environment (uv.lock) ---")

    # 1. Base command
    cmd = ["uv", "run"]
    if not ha_version:
        cmd.append("--frozen")

    if ha_version:
        # 2. Version handling and prerelease flag
        if ha_version in ["latest", "rc", "dev"]:
            cmd.extend(["--with", "homeassistant"])
            if ha_version in ["rc", "dev"]:
                cmd.append("--prerelease=allow")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…