mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Disable gc in-between energy sensor tests (#88593)
This commit is contained in:
parent
54de16875d
commit
09f1c2318d
@ -1,7 +1,6 @@
|
|||||||
"""Test the Energy sensors."""
|
"""Test the Energy sensors."""
|
||||||
import copy
|
import copy
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
import gc
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
@ -33,18 +32,6 @@ from tests.components.recorder.common import async_wait_recording_done
|
|||||||
from tests.typing import WebSocketGenerator
|
from tests.typing import WebSocketGenerator
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
|
||||||
def garbage_collection():
|
|
||||||
"""Make sure garbage collection is run between all tests.
|
|
||||||
|
|
||||||
There are unknown issues with GC triggering during a test
|
|
||||||
case, leading to the test breaking down. Make sure we
|
|
||||||
clean up between each testcase to avoid this issue.
|
|
||||||
"""
|
|
||||||
yield
|
|
||||||
gc.collect()
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
async def setup_integration(recorder_mock):
|
async def setup_integration(recorder_mock):
|
||||||
"""Set up the integration."""
|
"""Set up the integration."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user