We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c8abc0 commit 8afbf6fCopy full SHA for 8afbf6f
agent/test_agent.py
@@ -9,6 +9,7 @@
9
import pathlib
10
import random
11
import shutil
12
+import subprocess
13
import sys
14
import tempfile
15
import time
@@ -39,8 +40,8 @@ class TestAgentFunctions:
39
40
@mock.patch("sys.platform", "win32")
41
def test_get_subprocess_259(self):
42
mock_process_id = 999998
- mock_subprocess = mock.Mock(spec=multiprocessing.Process)
43
- mock_subprocess.exitcode = 259
+ mock_subprocess = mock.Mock(spec=subprocess.Popen)
44
+ mock_subprocess.poll = mock.Mock(return_value=259)
45
mock_subprocess.pid = mock_process_id
46
with mock.patch.dict(agent.state, {"async_subprocess": mock_subprocess}):
47
actual = agent.get_subprocess_status()
0 commit comments