Skip to content

~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.

Tests/increase coverage round4 (#2993)

LearningCircuite15684f1f932
diff --git a/tests/security/test_path_validator_deep_coverage.py b/tests/security/test_path_validator_deep_coverage.py
index 0439e52eea..75a30ed044 100644
--- a/tests/security/test_path_validator_deep_coverage.py
+++ b/tests/security/test_path_validator_deep_coverage.py
@@ -160,14 +160,20 @@ class TestValidateLocalFilesystemPath:
with pytest.raises(ValueError, match="Control characters"):
PathValidator.validate_local_filesystem_path("/tmp/test\x01file")
- def test_tilde_expansion(self, tmp_path):
+ def test_tilde_expansion(self):
"""Tilde is expanded to home directory."""
- result = PathValidator.validate_local_filesystem_path("~")
+ # Pass empty restricted_dirs to avoid /root being blocked in CI
+ result = PathValidator.validate_local_filesystem_path(
+ "~", restricted_dirs=[]
+ )
assert result == Path.home().resolve()
- def test_tilde_with_subpath(self, tmp_path):
+ def test_tilde_with_subpath(self):
"""Tilde with subpath is expanded correctly."""
- result = PathValidator.validate_local_filesystem_path("~/Documents")
+ # Pass empty restricted_dirs to avoid /root being blocked in CI
+ result = PathValidator.validate_local_filesystem_path(
+ "~/Documents", restricted_dirs=[]
+ )
expected = (Path.home() / "Documents").resolve()
assert result == expected