Skip to content

Commit 97906d8

Browse files
committed
Updated unit test
1 parent 114b928 commit 97906d8

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

tests/talkpipe/util/test_util.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,9 @@ def test_run_command_with_arguments():
6868
# Unix/Linux: use grep
6969
command = 'printf "apple\nbanana\ncherry" | grep "a"'
7070

71-
# Collect output lines
72-
output_lines = list(talkpipe.util.os.run_command(command))
73-
74-
# Assertions
75-
assert len(output_lines) == 2
76-
assert "apple" in output_lines
77-
assert "banana" in output_lines
71+
# Should expect SecurityError for shell commands with pipes
72+
with pytest.raises(talkpipe.util.os.SecurityError):
73+
list(talkpipe.util.os.run_command(command))
7874

7975
def test_get_all_attributes():
8076
class TestClass:

0 commit comments

Comments
 (0)