We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 114b928 commit 97906d8Copy full SHA for 97906d8
tests/talkpipe/util/test_util.py
@@ -68,13 +68,9 @@ def test_run_command_with_arguments():
68
# Unix/Linux: use grep
69
command = 'printf "apple\nbanana\ncherry" | grep "a"'
70
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
+ # Should expect SecurityError for shell commands with pipes
+ with pytest.raises(talkpipe.util.os.SecurityError):
+ list(talkpipe.util.os.run_command(command))
78
79
def test_get_all_attributes():
80
class TestClass:
0 commit comments