test: 补充测试覆盖率 — DB/CLI/Search/Ingest + 修复 chromadb 异常兼容

This commit is contained in:
2026-07-11 20:02:24 +08:00
parent 10c5d3d347
commit 6b89488677
6 changed files with 108 additions and 0 deletions
+18
View File
@@ -61,3 +61,21 @@ class TestCLIJSONOutput:
if result.stdout.strip():
data = json.loads(result.stdout)
assert isinstance(data, dict)
def test_ingest_help():
"""ingest --help 正常输出."""
result = runner.invoke(app, ["ingest", "--help"])
assert result.exit_code == 0
def test_search_help():
"""search --help 正常输出."""
result = runner.invoke(app, ["search", "--help"])
assert result.exit_code == 0
def test_export_help():
"""export --help 正常输出."""
result = runner.invoke(app, ["export", "--help"])
assert result.exit_code == 0