mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-10-26 13:16:24 +00:00
test(config): skip the config-upgrade cases that need Git Bash (#7246)
`test_config_version.py` guards its shell-script cases with `@pytest.mark.skipif(SCRIPT_BASH is None, ...)`, except for three `version_45` migration tests added later. On a host without Git Bash on PATH those tests pass `None` as the executable and fail with `TypeError: expected str, bytes or os.PathLike object, not NoneType` instead of skipping like their siblings, so the module reads as broken rather than inapplicable. Verified with `PATH` reduced to `%SystemRoot%\System32`: - before: the three tests failed with that TypeError - after: the three tests skip like the rest of the shell-script cases
This commit is contained in:
parent
8f9409bccc
commit
c08ae955e5
@ -302,6 +302,7 @@ def test_version_41_tools_only_ragflow_config_enables_knowledge_capability(tmp_p
|
||||
assert upgraded["tools"][0]["base_url"] == "http://legacy-ragflow:9380"
|
||||
|
||||
|
||||
@pytest.mark.skipif(SCRIPT_BASH is None, reason="repo shell-script tests need Git Bash on Windows")
|
||||
def test_version_45_tools_only_ragflow_config_runs_knowledge_migration(tmp_path):
|
||||
"""The knowledge migration must run for configs at the former base version."""
|
||||
import subprocess
|
||||
@ -351,6 +352,7 @@ def test_version_45_tools_only_ragflow_config_runs_knowledge_migration(tmp_path)
|
||||
assert upgraded["tools"][0]["base_url"] == "http://legacy-ragflow:9380"
|
||||
|
||||
|
||||
@pytest.mark.skipif(SCRIPT_BASH is None, reason="repo shell-script tests need Git Bash on Windows")
|
||||
def test_version_45_tools_only_lightrag_config_keeps_knowledge_tool_available(tmp_path):
|
||||
"""Upgrading a configured LightRAG provider must enable the new knowledge gate."""
|
||||
import subprocess
|
||||
@ -408,6 +410,7 @@ def test_version_45_tools_only_lightrag_config_keeps_knowledge_tool_available(tm
|
||||
assert "knowledge_search" in {tool.name for tool in tools}
|
||||
|
||||
|
||||
@pytest.mark.skipif(SCRIPT_BASH is None, reason="repo shell-script tests need Git Bash on Windows")
|
||||
def test_version_45_lightrag_config_preserves_explicit_disabled_gate(tmp_path):
|
||||
"""Migration must not override an operator's explicit knowledge gate value."""
|
||||
import subprocess
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user