v0.50.0: exports report the finished folder's size

This commit is contained in:
2026-10-10 23:48:03 -07:00
parent 3dcd30eab6
commit 96fac71075
4 changed files with 42 additions and 4 deletions
+20
View File
@@ -545,3 +545,23 @@ def test_image_filters_see_uppercase_suffixes():
patterns = flt[flt.index("(") + 1:-1].split()
for name in ("IMG_1897.JPG", "a.jpeg", "b.PNG", "c.WebP"[:-4] + "WEBP"):
assert any(fnmatch.fnmatchcase(name, p) for p in patterns), name
def test_export_reports_the_folder_size(tmp_path):
plan = exporter.plan_export(
"Mix", [_track(1, _audio(tmp_path, "a.mp3"))], tmp_path / "out",
exporter.WEB)
done = []
worker = exporter.ExportWorker(plan)
worker.finished.connect(done.append)
worker._run()
assert done[0]["bytes"] == exporter.folder_size(tmp_path / "out" / "Mix")
assert done[0]["bytes"] > 100 # the song plus page and assets
def test_upload_window_shows_the_size(qapp, window):
config.save_config({upload.HOST_KEY: HOST, upload.PATH_KEY: "/srv/mixes"})
window._export_playlist("abcd1234")
_wait_for(qapp, lambda: _FakeUpload.runs)
from lintunes.gui import web_upload_progress as wp
assert "KB" in window._web_progress.status(wp.EXPORT)