Lines Matching refs:subprocess
16 import subprocess
49 self.Patch(subprocess, "check_output", return_value=self.DEVICE_ALIVE)
53 self.Patch(subprocess, "check_output", return_value=self.DEVICE_OFFLINE)
57 self.Patch(subprocess, "check_output", return_value=self.DEVICE_NONE)
64 self.Patch(subprocess, "check_output", return_value=self.DEVICE_NONE)
77 self.Patch(subprocess, "check_output", return_value=self.DEVICE_ALIVE)
87 self.Patch(subprocess, "check_output", return_value=self.DEVICE_OFFLINE)
97 self.Patch(subprocess, "check_output", return_value=self.DEVICE_NONE)
103 self.Patch(subprocess, "check_output",
112 self.Patch(subprocess, "check_output", return_value=self.DEVICE_ALIVE)
113 self.Patch(subprocess, "check_call", return_value=True)
117 subprocess.check_call.assert_not_called()
119 self.Patch(subprocess, "check_output", return_value=self.DEVICE_OFFLINE)
120 self.Patch(subprocess, "check_call", return_value=True)
121 subprocess.check_call.call_count = 0
125 subprocess.check_call.assert_called_with([adb_cmd._adb_command,
133 self.Patch(subprocess, "check_output", return_value=self.DEVICE_ALIVE)
134 self.Patch(subprocess, "check_call", return_value=True)
138 subprocess.check_call.assert_not_called()
140 self.Patch(subprocess, "check_output", side_effect=[self.DEVICE_OFFLINE,
142 self.Patch(subprocess, "check_call", return_value=True)
143 subprocess.check_call.call_count = 0
147 subprocess.check_call.assert_called_with([adb_cmd._adb_command,
151 self.Patch(subprocess, "check_output", return_value=self.DEVICE_NONE)
152 self.Patch(subprocess, "check_call", return_value=True)
153 subprocess.check_call.call_count = 0
157 subprocess.check_call.assert_not_called()
160 self.Patch(subprocess, "check_output", return_value=self.DEVICE_OFFLINE)
161 self.Patch(subprocess, "check_call", return_value=True)
162 subprocess.check_call.call_count = 0
171 self.Patch(subprocess, "check_output", return_value=self.DEVICE_NONE)
174 self.Patch(subprocess, "Popen", return_value=mock_popen_obj)
180 subprocess.Popen.assert_called_once_with(
182 stdin=subprocess.PIPE,
183 stdout=subprocess.PIPE,
184 stderr=subprocess.PIPE)