MCPcopy Create free account
hub / github.com/FastLED/FastLED / test_valid_platform

Method test_valid_platform

ci/tests/test_package.py:99–117  ·  view source on GitHub ↗

Test valid platform creation

(self)

Source from the content-addressed store, hash-verified

97 """Test Platform model validation"""
98
99 def test_valid_platform(self) -> None:
100 """Test valid platform creation"""
101 platform_data: dict[str, Any] = {
102 "name": "ESP32 Arduino",
103 "architecture": "esp32",
104 "version": "2.0.5",
105 "category": "ESP32",
106 "url": "https://github.com/espressif/arduino-esp32/releases/download/2.0.5/esp32-2.0.5.zip",
107 "archiveFileName": "esp32-2.0.5.zip",
108 "checksum": "SHA-256:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
109 "size": "50000000",
110 "boards": [],
111 "toolsDependencies": [],
112 "help": {"online": "https://github.com/espressif/arduino-esp32"},
113 }
114 platform = Platform(**platform_data) # type: ignore
115 assert platform.name == "ESP32 Arduino"
116 assert platform.architecture == "esp32"
117 assert platform.size_mb == 50000000 / (1024 * 1024)
118
119 def test_invalid_archive_extension(self) -> None:
120 """Test invalid archive extension validation"""

Callers

nothing calls this directly

Calls 1

PlatformClass · 0.90

Tested by

no test coverage detected