The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(tools): tolerate search engines without ripgrep
ethernet947fa649c2d8
diff --git a/tests/tools/test_search_native_rg.py b/tests/tools/test_search_native_rg.pyindex 6bf8581afbf..8dcde0f8222 100644--- a/tests/tools/test_search_native_rg.py+++ b/tests/tools/test_search_native_rg.py@@ -7,7 +7,6 @@ shared, so the two transports must agree on results."""import json-import sysimport pytest@@ -60,6 +59,8 @@ def _normalized(result):def test_native_search_never_touches_the_shell_and_matches_shell_results(tree, ops_factory, monkeypatch):+ if not ops_factory(tree, [])._has_command("rg"):+ pytest.skip("native search parity requires ripgrep in the search environment")cases = [dict(pattern="needle", path=str(tree)),# (no offset/limit slicing here: rg's parallel walk orders files@@ -111,7 +112,7 @@ def test_kill_switch_routes_search_back_to_the_shell(tree, ops_factory, monkeyparesult = ops_factory(tree, calls).search(pattern="needle", path=str(tree))assert result.total_count == 4assert any(c.startswith("test -e") for c in calls)- assert any("pipefail" in c and "rg" in c for c in calls)+ assert any(c.startswith("set -o pipefail; ") for c in calls)def test_limit_hit_keeps_drained_matches_when_group_kill_is_refused(tree, ops_factory, monkeypatch):