Files
L'électron rare 916d4d123f feat(tower): routines staging push and delta
Add compute_delta_named, routines_staging_files, compute_routines_delta
so routines.json goes last in the push delta. Generalize push_file with
subdir param (default podcasts, compat preserved). Fix test_delta.py:
compute_delta lives in lisael_content, not lisael_server.
2026-06-21 09:24:45 +02:00

15 lines
623 B
Python

from lisael_content import compute_delta
def test_delta():
stg = ["oli_01.m4a", "oli.bin", "bestioles_01.mp3", "manifest.json"]
# empty box -> everything, manifest last
assert compute_delta(stg, []) == ["oli_01.m4a", "oli.bin", "bestioles_01.mp3", "manifest.json"]
# up-to-date box -> nothing (not even the manifest)
assert compute_delta(stg, ["oli_01.m4a", "oli.bin", "bestioles_01.mp3"]) == []
# box missing the cover -> .bin + manifest
assert compute_delta(stg, ["oli_01.m4a", "bestioles_01.mp3"]) == ["oli.bin", "manifest.json"]
print("OK")
if __name__ == "__main__":
test_delta()