1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-19 16:25:50 +00:00
This commit is contained in:
J. Nick Koston
2025-11-15 10:21:58 -06:00
parent 62248b6bba
commit 1441c7fab2

View File

@@ -1,19 +1,9 @@
"""Tests for lambda deduplication in cpp_generator."""
import pytest
from esphome import cpp_generator as cg
from esphome.core import CORE
@pytest.fixture(autouse=True)
def reset_core():
"""Reset CORE.data before each test."""
CORE.reset()
yield
CORE.reset()
def test_deduplicate_identical_lambdas():
"""Test that identical stateless lambdas are deduplicated."""
# Create two identical lambda expressions