From c051442adcca40cb507a291e173d1bf4f6554a84 Mon Sep 17 00:00:00 2001 From: Jann Stute Date: Sat, 28 Dec 2024 17:35:22 +0100 Subject: [PATCH] feat: add tests for parent tag search --- tagstudio/tests/test_search.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tagstudio/tests/test_search.py b/tagstudio/tests/test_search.py index 7d2e69db..9f3754b4 100644 --- a/tagstudio/tests/test_search.py +++ b/tagstudio/tests/test_search.py @@ -116,6 +116,20 @@ def test_parentheses(search_library: Library, query: str, count: int): verify_count(search_library, query, count) +@pytest.mark.parametrize( + ["query", "count"], + [ + ("ellipse", 17), + ("yellow", 15), + ("color", 24), + ("shape", 24), + ("yellow not green", 10), + ], +) +def test_parent_tags(search_library: Library, query: str, count: int): + verify_count(search_library, query, count) + + @pytest.mark.parametrize( "invalid_query", ["asd AND", "asd AND AND", "tag:(", "(asd", "asd[]", "asd]", ":", "tag: :"] )