Skip to content

Commit 1bc7efe

Browse files
committed
Fix ruff formatting in shell script tests
1 parent ec8f4bd commit 1bc7efe

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

tests/shell_script_tests/test_policy_stop_hook.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,7 @@ def test_respects_promise_tags(
225225
# Run the stop hook with transcript path
226226
script_path = shell_scripts_dir / "policy_stop_hook.sh"
227227
hook_input = {"transcript_path": transcript_path}
228-
stdout, stderr, code = run_stop_hook(
229-
script_path, git_repo_with_policy, hook_input
230-
)
228+
stdout, stderr, code = run_stop_hook(script_path, git_repo_with_policy, hook_input)
231229

232230
# Parse the output
233231
output = stdout.strip()
@@ -236,15 +234,11 @@ def test_respects_promise_tags(
236234
result = json.loads(output)
237235

238236
# Should be empty JSON because the policy was promised
239-
assert result == {}, (
240-
f"Expected empty JSON when policy is promised, got: {result}"
241-
)
237+
assert result == {}, f"Expected empty JSON when policy is promised, got: {result}"
242238
finally:
243239
os.unlink(transcript_path)
244240

245-
def test_safety_pattern_prevents_firing(
246-
self, shell_scripts_dir: Path, tmp_path: Path
247-
) -> None:
241+
def test_safety_pattern_prevents_firing(self, shell_scripts_dir: Path, tmp_path: Path) -> None:
248242
"""Test that safety patterns prevent policies from firing."""
249243
# Initialize git repo
250244
repo = Repo.init(tmp_path)
@@ -295,9 +289,7 @@ def test_safety_pattern_prevents_firing(
295289
result = json.loads(output)
296290

297291
# Should be empty JSON because safety pattern matched
298-
assert result == {}, (
299-
f"Expected empty JSON when safety pattern matches, got: {result}"
300-
)
292+
assert result == {}, f"Expected empty JSON when safety pattern matches, got: {result}"
301293

302294

303295
class TestPolicyStopHookJsonFormat:

0 commit comments

Comments
 (0)