mirror of
https://github.com/esphome/esphome.git
synced 2026-10-07 11:26:39 +00:00
Match the encoder's lower bound to the PlatformIO era guard, drop the unused logger
<= 2.6.2 instead of < 2.6.3: a 2.6.2 pre-release sorts above 2.6.2 and belongs to the package-major-3 encoding, so the helper now describes the same set as _format_framework_arduino_version and a 2.6.2-b1 pin formats as it does on dev. The module never logged, so its _LOGGER and logging import go.
This commit is contained in:
@@ -27,9 +27,12 @@ def test_framework_package_version() -> None:
|
||||
# A future major bump needs its own encoding, not a doomed registry lookup
|
||||
with pytest.raises(EsphomeError, match="not supported yet"):
|
||||
framework.framework_package_version(cv.Version(4, 0, 0))
|
||||
# The pre-2.6.3 eras use other encodings; the helper is total, not wrong
|
||||
with pytest.raises(EsphomeError, match="predates the package encoding"):
|
||||
# Cores up to 2.6.2 use other encodings; the helper is total, not wrong,
|
||||
# and its boundary matches the PlatformIO era guard: a 2.6.2 pre-release
|
||||
# sorts above 2.6.2 and keeps the package-major-3 encoding
|
||||
with pytest.raises(EsphomeError, match="older package encoding"):
|
||||
framework.framework_package_version(cv.Version(2, 6, 2))
|
||||
assert framework.framework_package_version(cv.Version(2, 6, 2, "b1")) == "3.20602.0"
|
||||
assert framework.framework_package_version(cv.Version(2, 6, 3)) == "3.20603.0"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user