"""Tests for encoder/run.py -- combined cache loading and source provenance.""" from encoder import run def test_cache_or_load_exposes_explicit_dimensions(): assert "frame_count" in run.cache_or_load.__code__.co_varnames def test_video_mode_preserves_depth_and_tracking(): assert run._effective_dimensions("relative", None, "tracking", True) == ( "relative", "video", "tracking", ) def test_video_mode_selects_caches_for_requested_axes(tmp_path, monkeypatch): monkeypatch.setattr(run.config, "CACHE_ROOT", tmp_path) da3_path, sam3_path = run._cache_source_paths( "scene", "relative", "video", "tracking", 32, True, None, None ) assert da3_path.endswith("depth-anything-3/relative/video/scene.npz") assert sam3_path.endswith("sam3/tracking/video/scene.pkl.gz")