From 4de9ea68dfbea7d6d8aa9dc5ea0c4b6328e55dc1 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 30 Oct 2026 19:22:01 +0100 Subject: Add Clear action to empty the view Deletes the job's temp PNGs, which reach hundreds of MB at 4x. Asks before discarding an upscaled result that was neither saved nor written over the original. Co-Authored-By: Claude Opus 5.5 --- test_upscale_qt.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test_upscale_qt.py') diff --git a/test_upscale_qt.py b/test_upscale_qt.py index cb11346..66423e8 100644 --- a/test_upscale_qt.py +++ b/test_upscale_qt.py @@ -107,6 +107,11 @@ def test_main_window(): assert w.a_up.isEnabled() and not w.a_save.isEnabled() assert w.models.itemText(0) == 'Clean photos: people, nature [a]' assert w.models.currentData() == 'a.pth' + assert w.a_clear.isEnabled() + temp_in = w.jobs[0].input + w.clear() + assert w.jobs == [] and w.view.before is None and not os.path.exists(temp_in) + assert not w.a_clear.isEnabled() and not w.a_up.isEnabled() if __name__ == '__main__': -- cgit v1.2.3