~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
"""
Tests for _parse_multiselect() in settings/manager.py.
Covers list passthrough, JSON array parsing, comma-separated splitting,
and edge cases (empty, malformed, non-string/list types).
"""
import pytest
from local_deep_research.settings.manager import _parse_multiselect
class TestParseMultiselect:
"""Tests for _parse_multiselect()."""
def test_list_passthrough(self):
assert _parse_multiselect(["a", "b"]) == ["a", "b"]
def test_empty_list_passthrough(self):
assert _parse_multiselect([]) == []
def test_json_array_string(self):
assert _parse_multiselect('["markdown","latex"]') == [
"markdown",
"latex",
]
def test_json_array_with_spaces(self):
assert _parse_multiselect(' ["a", "b"] ') == ["a", "b"]
def test_comma_separated_string(self):
assert _parse_multiselect("markdown,latex") == ["markdown", "latex"]
def test_comma_separated_with_spaces(self):
assert _parse_multiselect(" a , b , c ") == ["a", "b", "c"]
def test_single_value_no_comma(self):
assert _parse_multiselect("markdown") == ["markdown"]
def test_empty_string(self):
assert _parse_multiselect("") == []
def test_malformed_json_is_not_reinterpreted_as_comma_separated(self):
with pytest.raises(ValueError):
_parse_multiselect('["broken')
def test_non_string_non_list_is_invalid(self):
with pytest.raises(ValueError):
_parse_multiselect(42)