aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-21 11:40:59 +0200
committerDanilo M. <danix@danix.xyz>2026-10-21 11:40:59 +0200
commitf8e9991c92618967e89a5ee4bf84de1556b6af5f (patch)
tree6cd2048b7ff7949d935c350d48bddc0de12fd810 /tests
parent766ce6ff1ea584dfe980a5e0b29251768c4c0726 (diff)
downloadsb-builder-f8e9991c92618967e89a5ee4bf84de1556b6af5f.tar.gz
sb-builder-f8e9991c92618967e89a5ee4bf84de1556b6af5f.zip
sbb-remote 0.12.1: Built tile lists the packages to pruneHEADmaster
stats returns the prunable items instead of their count, and a click on the Built tile shows them in a non-modal box, so they can be read while another job holds the lock and Prune's preview cannot start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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")