mirror of
https://github.com/esphome/esphome.git
synced 2025-11-20 08:46:01 +00:00
preen
This commit is contained in:
@@ -1,19 +1,9 @@
|
|||||||
"""Tests for lambda deduplication in cpp_generator."""
|
"""Tests for lambda deduplication in cpp_generator."""
|
||||||
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
from esphome import cpp_generator as cg
|
from esphome import cpp_generator as cg
|
||||||
from esphome.core import CORE
|
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():
|
def test_deduplicate_identical_lambdas():
|
||||||
"""Test that identical stateless lambdas are deduplicated."""
|
"""Test that identical stateless lambdas are deduplicated."""
|
||||||
# Create two identical lambda expressions
|
# Create two identical lambda expressions
|
||||||
|
|||||||
Reference in New Issue
Block a user