aboutsummaryrefslogtreecommitdiffstats
path: root/test_upscale_qt.py
diff options
context:
space:
mode:
Diffstat (limited to 'test_upscale_qt.py')
-rw-r--r--test_upscale_qt.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test_upscale_qt.py b/test_upscale_qt.py
index 7175e92..37e0484 100644
--- a/test_upscale_qt.py
+++ b/test_upscale_qt.py
@@ -129,6 +129,10 @@ def test_quit_asks_when_unsaved():
assert not w.close() and len(answers) == 1 # declined, stays open
w.jobs[0].saved = True
assert w.close() and len(answers) == 1 # saved, no question
+ w.what = 'upscale' # pretend sd-cli runs
+ assert not w.close() and len(answers) == 2 # declined, stays open
+ QMessageBox.question = lambda *a: answers.append(a) or QMessageBox.StandardButton.Yes
+ assert w.close() and len(answers) == 3
finally:
QMessageBox.question = real