Lines Matching refs:subprocess
16 import subprocess
48 self.Patch(subprocess, "check_output", return_value=self.DEVICE_ALIVE)
52 self.Patch(subprocess, "check_output", return_value=self.DEVICE_OFFLINE)
56 self.Patch(subprocess, "check_output", return_value=self.DEVICE_NONE)
63 self.Patch(subprocess, "check_output", return_value=self.DEVICE_NONE)
76 self.Patch(subprocess, "check_output", return_value=self.DEVICE_ALIVE)
86 self.Patch(subprocess, "check_output", return_value=self.DEVICE_OFFLINE)
96 self.Patch(subprocess, "check_output", return_value=self.DEVICE_NONE)
103 self.Patch(subprocess, "check_output", return_value=self.DEVICE_ALIVE)
116 self.Patch(subprocess, "check_output",
125 self.Patch(subprocess, "check_output", return_value=self.DEVICE_ALIVE)
126 self.Patch(subprocess, "check_call", return_value=True)
130 subprocess.check_call.assert_not_called()
132 self.Patch(subprocess, "check_output", return_value=self.DEVICE_OFFLINE)
133 self.Patch(subprocess, "check_call", return_value=True)
134 subprocess.check_call.call_count = 0
138 subprocess.check_call.assert_called_with([adb_cmd._adb_command,
146 self.Patch(subprocess, "check_output", return_value=self.DEVICE_ALIVE)
147 self.Patch(subprocess, "check_call", return_value=True)
151 subprocess.check_call.assert_not_called()
153 self.Patch(subprocess, "check_output", side_effect=[self.DEVICE_OFFLINE,
155 self.Patch(subprocess, "check_call", return_value=True)
156 subprocess.check_call.call_count = 0
160 subprocess.check_call.assert_called_with([adb_cmd._adb_command,
164 self.Patch(subprocess, "check_output", return_value=self.DEVICE_NONE)
165 self.Patch(subprocess, "check_call", return_value=True)
166 subprocess.check_call.call_count = 0
170 subprocess.check_call.assert_not_called()
173 self.Patch(subprocess, "check_output", return_value=self.DEVICE_OFFLINE)
174 self.Patch(subprocess, "check_call", return_value=True)
175 subprocess.check_call.call_count = 0
184 self.Patch(subprocess, "check_output", return_value=self.DEVICE_NONE)
187 self.Patch(subprocess, "Popen", return_value=mock_popen_obj)
193 subprocess.Popen.assert_called_once_with(
195 stdin=subprocess.PIPE,
196 stdout=subprocess.PIPE,
197 stderr=subprocess.PIPE)