1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 06:33:51 +00:00
This commit is contained in:
J. Nick Koston
2025-07-04 07:55:01 -05:00
parent db86f87fc3
commit 5dd76966c3
2 changed files with 65 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
"""Simple test that defer() maintains FIFO order."""
import asyncio
import pytest
from .types import APIClientConnectedFactory, RunCompiledFunction
@pytest.mark.asyncio
async def test_defer_fifo_simple(
yaml_config: str,
run_compiled: RunCompiledFunction,
api_client_connected: APIClientConnectedFactory,
) -> None:
"""Test that defer() maintains FIFO order with a simple test."""
async with run_compiled(yaml_config), api_client_connected() as client:
# Just verify we can connect and the device is running
device_info = await client.device_info()
assert device_info is not None
assert device_info.name == "defer-fifo-simple"
# Give the test component time to run
await asyncio.sleep(5)
# The component will log results, we mainly want to ensure
# it doesn't crash and completes successfully
print("Defer FIFO simple test completed")