1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-18 01:33:51 +01:00
This commit is contained in:
J. Nick Koston
2025-09-21 10:07:27 -06:00
parent 594c60a4a4
commit 17704f712e

View File

@@ -41,11 +41,8 @@ def mock_file() -> io.BytesIO:
@pytest.fixture @pytest.fixture
def mock_time(): def mock_time():
"""Mock time-related functions for consistent testing.""" """Mock time-related functions for consistent testing."""
with ( with patch("time.sleep"), patch("time.perf_counter", side_effect=[0, 1]):
patch("time.sleep"), yield
patch("time.perf_counter", side_effect=[0, 1]),
) as mocks:
yield mocks
@pytest.fixture @pytest.fixture