mirror of
https://github.com/esphome/esphome.git
synced 2025-10-18 01:33:51 +01:00
preen
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user