aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-20 12:29:03 +0200
committerDanilo M. <danix@danix.xyz>2026-10-20 12:29:03 +0200
commiteaeeb7349504d83cd3251daba4c557854c46cd00 (patch)
tree360786743b8111b364e686131820f02895e1565b /tests
parentecf11290bda5a670ff520f62a96d85645ad95d82 (diff)
downloadsb-builder-eaeeb7349504d83cd3251daba4c557854c46cd00.tar.gz
sb-builder-eaeeb7349504d83cd3251daba4c557854c46cd00.zip
Packages: orphaned filter chip
SBo marks an orphaned package MAINTAINER="orphaned - no maintainer" (1936 in the tree today); the inventory already carries the maintainer, so the chip filters in the GUI alone. The shown/selected count moves next to the search field so the chip row fits the default window width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test_gui.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_gui.py b/tests/test_gui.py
index 9d3e565..d5a1128 100644
--- a/tests/test_gui.py
+++ b/tests/test_gui.py
@@ -151,7 +151,7 @@ INVENTORY = {"columns": COLS, "rows": [
requires=["go"]),
inv_row("personal/foo", built="1.0", result="ok", hints={"DELREQUIRES": "x"}, requires=["x", "y"]),
inv_row("pentesting/nmap", built="7.9", result="bad"),
- inv_row("network/curl"),
+ inv_row("network/curl", maintainer="orphaned - no maintainer"),
]}
RESULTS = {"rows": [["games/pcsx2", "failed", 1789992366, None, True], # newest first, as the helper
["development/whisper.cpp", "aborted", 1789753147, None, False],
@@ -260,6 +260,8 @@ class FilterTest(unittest.TestCase):
self.assertEqual(self.names(overlays={"personal", "pentesting"}), ["foo", "nmap"])
self.assertEqual(self.names(overlays={"upstream"}, statuses={"never", "failed"}), ["curl"])
self.assertEqual(self.names("cat:misc", statuses={"ok"}), [])
+ terms = pk.parse_query("")
+ self.assertEqual([n for n, r in self.rows.items() if pk.matches(r, terms, orphans=True)], ["curl"])
class MeterTest(unittest.TestCase):
@@ -376,6 +378,9 @@ class SmokeTest(unittest.TestCase):
tab.chips["failed"].setChecked(True)
self.assertEqual(tab.proxy.rowCount(), 1)
tab.chips["failed"].setChecked(False)
+ tab.chips["orphaned"].setChecked(True)
+ self.assertEqual(tab.proxy.rowCount(), 1) # curl
+ tab.chips["orphaned"].setChecked(False)
started = []
tab.start_requested.connect(started.append)
tab.act("update")