Test parsing real ESP32 package index
(self)
| 187 | """Test with real ESP32 package index data (if network available)""" |
| 188 | |
| 189 | def test_esp32_package_parsing(self) -> None: |
| 190 | """Test parsing real ESP32 package index""" |
| 191 | ESP32_URL = "https://espressif.github.io/arduino-esp32/package_esp32_index.json" |
| 192 | |
| 193 | try: |
| 194 | parser = PackageIndexParser(timeout=10) |
| 195 | package_index = parser.parse_from_url(ESP32_URL) |
| 196 | |
| 197 | # Basic validation |
| 198 | assert len(package_index.packages) > 0 |
| 199 | |
| 200 | esp32_package = package_index.packages[0] |
| 201 | assert esp32_package.name == "esp32" |
| 202 | assert len(esp32_package.platforms) > 0 |
| 203 | assert len(esp32_package.tools) > 0 |
| 204 | |
| 205 | print("✅ Successfully parsed ESP32 package index:") |
| 206 | print(f" 📦 Packages: {len(package_index.packages)}") |
| 207 | print(f" 🛠️ Platforms: {len(esp32_package.platforms)}") |
| 208 | print(f" 🔧 Tools: {len(esp32_package.tools)}") |
| 209 | |
| 210 | except KeyboardInterrupt as ki: |
| 211 | handle_keyboard_interrupt(ki) |
| 212 | raise |
| 213 | except Exception as e: |
| 214 | # Skip if network not available |
| 215 | pytest.skip(f"Network test skipped: {e}") |
| 216 | |
| 217 | |
| 218 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected