def test_selected_categories_wblist_long(mock_get_compatible_sets): """Mixing white/black list results in the differentiated set if blist is longer.""" wl = ["a", "b"] bl = ["a", "d", "e"] result = cli.selected_categories(wl, bl) assert result == ["b"]
def test_selected_categories_blist(mock_get_compatible_sets): """Blacklisted categories are the inverse selection.""" bl = ["a", "b", "c"] result = cli.selected_categories([], bl) assert sorted(result) == sorted(["d", "e"])
def test_selected_categories_wlist(mock_get_compatible_sets): """Whitelisted categories are only selections.""" wl = ["a", "b"] result = cli.selected_categories(wl, []) assert sorted(result) == sorted(wl)
def test_selected_categories_empty_lists(mock_get_compatible_sets): """Empty lists should be the full set.""" result = cli.selected_categories([], []) assert sorted(result) == sorted(EXPECTED_CATEGORIES)
def test_selected_categories_wblist(mock_get_compatible_sets): """Mixing white/black list results in the differentiated set.""" wl = ["a", "b"] bl = ["a"] result = selected_categories(wl, bl) assert result == {"b"}
def test_selected_categories_blist(mock_get_compatible_sets): """Blacklisted categories are the inverse selection.""" bl = ["a", "b", "c"] result = selected_categories([], bl) assert result == {"d", "e"}