diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-21 09:57:21 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-21 09:57:21 +0200 |
| commit | 45c7a3f4ac550be4bb4cf4c3a7786dfbbff02859 (patch) | |
| tree | 58b1e8428e471bd7ebf4fea8adca78b003a726ee /tests | |
| parent | cdbf53d4f6ed8009b4d5ac55f65208efb2fe7b1b (diff) | |
| download | sb-builder-45c7a3f4ac550be4bb4cf4c3a7786dfbbff02859.tar.gz sb-builder-45c7a3f4ac550be4bb4cf4c3a7786dfbbff02859.zip | |
Packages: hint column, hint: query prefix
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_gui.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_gui.py b/tests/test_gui.py index eef9c5d..8ffb65d 100644 --- a/tests/test_gui.py +++ b/tests/test_gui.py @@ -256,6 +256,19 @@ class FilterTest(unittest.TestCase): self.assertEqual(pk.vercmp(a, b), want, (a, b)) self.assertEqual(pk.vercmp(b, a), -want, (b, a)) + def test_hint_kind(self): + for hints, want in ((None, ""), ({"SKIP": "yes", "VERSION": "2"}, "skip"), + ({"SKIP": "no", "VERSION": "2"}, "pin"), + ({"DELREQUIRES": "x", "ADDREQUIRES": "y"}, "deps"), + ({"ARCH": "x86_64"}, "other"), ({}, "other"), + ({"VERSION": {"value": "$V", "shell": True}}, "pin")): + self.assertEqual(pk.hint_kind(hints), want, hints) + + def test_hint_query(self): + self.assertEqual(self.names("hint:deps"), ["foo"]) + self.assertEqual(self.names("hint:none"), ["borgbackup", "curl", "nmap", "nuclei"]) + self.assertEqual(self.rows["foo"]["hint"], "deps") + def test_query(self): self.assertEqual(pk.parse_query("Nuc cat:misc bogus:x status:"), [(None, "nuc"), ("category", "misc"), (None, "bogus:x"), (None, "status:")]) |
