diff --git a/tagstudio/tests/test_filter_state.py b/tagstudio/tests/test_filter_state.py deleted file mode 100644 index cd3c7c85..00000000 --- a/tagstudio/tests/test_filter_state.py +++ /dev/null @@ -1,36 +0,0 @@ -import pytest -from src.core.library.alchemy.enums import FilterState - - -def test_filter_state_query(): # TODO TSQLANG can this test be removed? - # Given - query = "tag:foo" - state = FilterState.from_search_query(query) - - # When - # assert state.tag == "foo" - - -@pytest.mark.parametrize( - ["attribute", "comparator"], - [ - ("tag", str), - ("tag_id", int), - ("path", str), - ("name", str), - ("id", int), - ], -) -def test_filter_state_attrs_compare(attribute, comparator): # TODO TSQLANG rework this test - # When - state = FilterState(**{attribute: "2"}) - - # Then - # compare the attribute value - assert getattr(state, attribute) == comparator("2") - - # Then - for prop in ("tag", "tag_id", "path", "name", "id"): - if prop == attribute: - continue - assert not getattr(state, prop)