Diffuser la qualité des dalles dans l'inventaire et la conserver sur la carte légère
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@ -712,3 +712,20 @@ def test_webp_subtiles_indexed_and_rendered_nearest(tmp_path):
|
||||
assert img is not None
|
||||
grays = {p[0] for p in img.getdata() if p[3] == 255}
|
||||
assert grays <= {0, 255} # aucun gris intermédiaire inventé
|
||||
|
||||
|
||||
def test_remote_quality_persisted_locally(tmp_path, monkeypatch):
|
||||
"""La table qualité amont est recopiée en sidecars locaux (Pi autonome)."""
|
||||
from lidar_pipeline import tiles
|
||||
from lidar_pipeline.quality import read_quality
|
||||
payload = _remote_payload()
|
||||
base = "LHD_FXX_1054_6882_PTS_LAMB93_IGN69"
|
||||
payload["quality"] = {base: {"version": 1, "ground_density": 3.0},
|
||||
"../evasion": {"version": 1}}
|
||||
monkeypatch.setattr(tiles, "REMOTE_SOURCE_URL", "http://amont")
|
||||
monkeypatch.setattr(tiles, "_remote_payload", lambda force=False: payload)
|
||||
monkeypatch.setattr(tiles, "_remote_cache", dict(tiles._remote_cache, index=None, built=None))
|
||||
tiles._remote_index(tmp_path, force=True)
|
||||
assert read_quality(tmp_path, base) == {"version": 1, "ground_density": 3.0}
|
||||
assert not (tmp_path / "evasion.json").exists()
|
||||
assert list((tmp_path / "quality").iterdir()) == [tmp_path / "quality" / f"{base}.json"]
|
||||
|
||||
Reference in New Issue
Block a user