Formatting for the map's memory budget and its tests
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
db6370407a
commit
c3c18b1c85
2 files changed
+5
-5
No files matched your search
@@ -124,6 +124,7 @@ def _memo_budget() -> int:
|
||||
return _MEMO_CEILING
|
||||
return max(_MEMO_FLOOR, min(_MEMO_CEILING, physical // _MEMO_SHARE))
|
||||
|
||||
|
||||
#: How long a failed TileJSON resolve stands before the source will ask again. The PicoCalc
|
||||
#: brings its Wi-Fi up some 40 seconds into the boot, well after the app it was started
|
||||
#: alongside can reach the menu — so "offline" asked once at open is a verdict on the
|
||||
|
||||
+4
-5
@@ -243,10 +243,7 @@ def test_polygon_fill_lights_exactly_the_dots_a_scan_of_every_edge_would() -> No
|
||||
|
||||
def reference(canvas: MapCanvas, rings, stipple: int) -> None:
|
||||
edges = [
|
||||
(x0, y0, x1, y1)
|
||||
for ring in rings
|
||||
for (x0, y0), (x1, y1) in pairwise(ring)
|
||||
if y0 != y1
|
||||
(x0, y0, x1, y1) for ring in rings for (x0, y0), (x1, y1) in pairwise(ring) if y0 != y1
|
||||
]
|
||||
for y in range(0, canvas.dot_h, stipple):
|
||||
yc = y + 0.5
|
||||
@@ -1288,7 +1285,9 @@ def test_basemap_source_holds_decoded_tiles_to_a_byte_budget(tmp_path: Path) ->
|
||||
|
||||
tile = decode_tile(_FIXTURE.read_bytes())
|
||||
one = resident_bytes(tile)
|
||||
src = BasemapSource(tmp_path / "cache", tilejson_url="http://127.0.0.1:1/none", memo_bytes=one * 5 // 2)
|
||||
src = BasemapSource(
|
||||
tmp_path / "cache", tilejson_url="http://127.0.0.1:1/none", memo_bytes=one * 5 // 2
|
||||
)
|
||||
for i in range(5):
|
||||
src._remember((14, i, 0), tile)
|
||||
|
||||
|
||||
Reference in new issue
Block a user