mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-27 21:05:34 +00:00
style: apply Ruff formatting to recently merged tests (#644)
Fix the Ruff formatter check on main by formatting tests changed in #639 and #640 with the repository's pinned Ruff 0.15.1. No behavior change.
This commit is contained in:
@@ -255,9 +255,7 @@ class TestDangerousCapabilityGate:
|
||||
assert result.success
|
||||
assert result.requires_confirmation
|
||||
assert any("confirmed by caller" in w for w in result.warnings)
|
||||
content = (
|
||||
tmp_path / "skills" / "hermes" / "my-skill" / ".source"
|
||||
).read_text()
|
||||
content = (tmp_path / "skills" / "hermes" / "my-skill" / ".source").read_text()
|
||||
assert 'trust_tier = "unreviewed"' in content
|
||||
assert 'dangerous_capabilities = ["shell:execute"]' in content
|
||||
|
||||
@@ -269,8 +267,6 @@ class TestDangerousCapabilityGate:
|
||||
assert result.success
|
||||
assert not result.requires_confirmation
|
||||
assert result.dangerous_capabilities == []
|
||||
content = (
|
||||
tmp_path / "skills" / "hermes" / "my-skill" / ".source"
|
||||
).read_text()
|
||||
content = (tmp_path / "skills" / "hermes" / "my-skill" / ".source").read_text()
|
||||
assert 'trust_tier = "unreviewed"' in content
|
||||
assert "dangerous_capabilities = []" in content
|
||||
|
||||
@@ -171,9 +171,7 @@ class TestSkillExecutorCapabilities:
|
||||
assert result.context.get("result") == "hello"
|
||||
|
||||
def test_policy_blocks_missing_capability(self):
|
||||
executor = SkillExecutor(
|
||||
ToolExecutor([EchoTool()]), allowed_capabilities=set()
|
||||
)
|
||||
executor = SkillExecutor(ToolExecutor([EchoTool()]), allowed_capabilities=set())
|
||||
result = executor.run(self._manifest())
|
||||
assert not result.success
|
||||
assert len(result.step_results) == 1
|
||||
|
||||
@@ -70,9 +70,7 @@ def test_allows_select_with_keyword_substring(store: KnowledgeStore) -> None:
|
||||
from openjarvis.tools.knowledge_sql import KnowledgeSQLTool
|
||||
|
||||
tool = KnowledgeSQLTool(store=store)
|
||||
result = tool.execute(
|
||||
query="SELECT author AS created_author FROM knowledge_chunks"
|
||||
)
|
||||
result = tool.execute(query="SELECT author AS created_author FROM knowledge_chunks")
|
||||
assert result.success, result.content
|
||||
assert "Alice" in result.content
|
||||
|
||||
|
||||
Reference in New Issue
Block a user