aboutsummaryrefslogtreecommitdiff
path: root/tests/test_utils_proc.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_utils_proc.py')
-rw-r--r--tests/test_utils_proc.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_utils_proc.py b/tests/test_utils_proc.py
new file mode 100644
index 0000000..bea431f
--- /dev/null
+++ b/tests/test_utils_proc.py
@@ -0,0 +1,17 @@
+# SPDX-FileCopyrightText: Copyright 2023, Arm Limited and/or its affiliates.
+# SPDX-License-Identifier: Apache-2.0
+"""Tests for process management functions."""
+from unittest.mock import MagicMock
+
+from mlia.utils.proc import Command
+from mlia.utils.proc import process_command_output
+
+
+def test_process_command_output() -> None:
+ """Test function process_command_output."""
+ command = Command(["echo", "-n", "sample message"])
+
+ output_consumer = MagicMock()
+ process_command_output(command, [output_consumer])
+
+ output_consumer.assert_called_once_with("sample message")