aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_gui.py9
-rw-r--r--tests/test_remote.py2
2 files changed, 8 insertions, 3 deletions
diff --git a/tests/test_gui.py b/tests/test_gui.py
index f5894de..496061a 100644
--- a/tests/test_gui.py
+++ b/tests/test_gui.py
@@ -32,7 +32,7 @@ sys.path.insert(0, ROOT)
from PyQt6.QtCore import QObject, QPointF, QProcess, pyqtSignal # noqa: E402
from PyQt6.QtGui import QColor # noqa: E402
-from PyQt6.QtWidgets import QApplication # noqa: E402
+from PyQt6.QtWidgets import QApplication, QMessageBox # noqa: E402
from sb_builder import VERSION, config # noqa: E402
from sb_builder import hints as hintlib # noqa: E402
@@ -486,10 +486,15 @@ class SmokeTest(unittest.TestCase):
self.assertIn(("job-start", "slackrepo", "build", "--preview", "b", "c"), remote.calls)
def test_prunable_enables_prune(self):
- w, _ = self.window(stats=(dict(STATS, prunable=3, slackrepo={"results": {}, "built": 5}), None))
+ gone = ["a/x", "b/y", "c/z"]
+ w, _ = self.window(stats=(dict(STATS, prunable=gone, slackrepo={"results": {}, "built": 5}), None))
w.poll_jobs()
self.assertTrue(w.packages_tab.act_prune.isEnabled())
self.assertIn("3 to prune", w.dashboard.tiles["Built"].detail.text())
+ w.dashboard.tiles["Built"].clicked.emit()
+ box = w.findChild(QMessageBox)
+ self.assertFalse(box.isModal())
+ self.assertEqual(box.detailedText(), "a/x\nb/y\nc/z")
def test_slackpkg_dot(self):
old = dict(STATS, slackpkg={"update": None, "upgrade": 1})
diff --git a/tests/test_remote.py b/tests/test_remote.py
index 9f28701..f9e541f 100644
--- a/tests/test_remote.py
+++ b/tests/test_remote.py
@@ -185,7 +185,7 @@ class KindsTest(Base):
kind = sbb.KINDS["slackrepo"]
self.assertEqual(kind(self.cfg, ["prune", "--preview"]),
(["slackrepo", "--repo=SBo-danix", "remove", "--preview", "misc/gone"], {}))
- self.assertEqual(sbb.cmd_stats(self.cfg)["prunable"], 1)
+ self.assertEqual(sbb.cmd_stats(self.cfg)["prunable"], ["misc/gone"])
with self.assertRaises(sbb.Error):
kind(self.cfg, ["prune", "kept"])
self.make_pkg("misc/gone")