Release v0.1.9: enforce Photos API boundary and finalize Server migration

This commit is contained in:
渡口浪人
2026-10-17 01:39:23 +08:00
parent 46a0429d5e
commit b87bf6f77e
35 changed files with 724 additions and 155 deletions
+9 -1
View File
@@ -62,12 +62,16 @@ def test_cached_dimensions_invalidation_and_no_fallback(
),
)
assert len(oriented.catalog("family")) == 1
from pigway_frame_flow.providers.photo_sources import dimensions
monkeypatch.setattr(
"pigway_frame_flow.providers.photo_sources.dimensions",
lambda *a: pytest.fail("unchanged dimensions should be cached"),
)
assert len(oriented.catalog("family", refresh=True)) == 1
monkeypatch.undo()
monkeypatch.setattr(
"pigway_frame_flow.providers.photo_sources.dimensions", dimensions
)
Image.new("RGB", (50, 100)).save(settings.photo_root / "20240101 Day" / "wide.jpg")
assert oriented.catalog("family", refresh=True) == []
with pytest.raises(FlowError):
@@ -110,3 +114,7 @@ def test_orientation_validation_and_api(client, oriented):
).json()["error"]["code"]
== "UNSUPPORTED_CAPABILITY"
)
# Legacy algorithms remain covered; production filesystem access is tested separately.
pytestmark = pytest.mark.usefixtures("legacy_photo_engine")