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

Method test_format_size

ci/tests/test_package.py:172–183  ·  view source on GitHub ↗

Test size formatting function

(self)

Source from the content-addressed store, hash-verified

170 """Test utility functions"""
171
172 def test_format_size(self) -> None:
173 """Test size formatting function"""
174 # Test KB
175 assert format_size(0.5) == "512.0 KB"
176
177 # Test MB
178 assert format_size(1.5) == "1.5 MB"
179 assert format_size(512.0) == "512.0 MB"
180
181 # Test GB
182 assert format_size(1536.0) == "1.5 GB"
183 assert format_size(2048.0) == "2.0 GB"
184
185
186class TestRealDataParsing:

Callers

nothing calls this directly

Calls 1

format_sizeFunction · 0.90

Tested by

no test coverage detected