aboutsummaryrefslogtreecommitdiffstats
path: root/test_upscale_qt.py
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-30 19:22:01 +0100
committerDanilo M. <danix@danix.xyz>2026-10-30 19:22:01 +0100
commit4de9ea68dfbea7d6d8aa9dc5ea0c4b6328e55dc1 (patch)
treea5e967f02693aa1ba44636a00b7c9bec99f966ab /test_upscale_qt.py
parent69810152d0dfedeaa02a96df73cbc184225a1278 (diff)
downloadupscale-qt-4de9ea68dfbea7d6d8aa9dc5ea0c4b6328e55dc1.tar.gz
upscale-qt-4de9ea68dfbea7d6d8aa9dc5ea0c4b6328e55dc1.zip
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 <noreply@anthropic.com>
Diffstat (limited to 'test_upscale_qt.py')
-rw-r--r--test_upscale_qt.py5
1 files changed, 5 insertions, 0 deletions
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__':