[core] Import CORE at module level in the generator tests

This commit is contained in:
J. Nick Koston committed 2026-09-11 21:01:15 -05:00
1 parent 227097a36e
commit a17ddfec99
1 file changed
+1 -2
+1 -2
View File
@@ -4,6 +4,7 @@ import math
import pytest
from esphome import cpp_generator as cg, cpp_types as ct
from esphome.core import CORE
class TestExpressions:
@@ -794,8 +795,6 @@ async def test_templatable__lambda_with_std_string() -> None:
class TestPvariablePlacementNew:
def _placement_new(self) -> str:
from esphome.core import CORE
return next(
str(stmt) for stmt in CORE.main_statements if str(stmt).startswith("new(")
)