From eaeeb7349504d83cd3251daba4c557854c46cd00 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 20 Oct 2026 12:29:03 +0200 Subject: 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 --- tests/test_gui.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests') 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") -- cgit v1.2.3