Lines Matching refs:subprocess

16 import subprocess
41 self.Patch(subprocess, "check_output", return_value=self.DEVICE_ALIVE)
45 self.Patch(subprocess, "check_output", return_value=self.DEVICE_OFFLINE)
49 self.Patch(subprocess, "check_output", return_value=self.DEVICE_NONE)
56 self.Patch(subprocess, "check_output", return_value=self.DEVICE_NONE)
69 self.Patch(subprocess, "check_output", return_value=self.DEVICE_ALIVE)
79 self.Patch(subprocess, "check_output", return_value=self.DEVICE_OFFLINE)
89 self.Patch(subprocess, "check_output", return_value=self.DEVICE_NONE)
97 self.Patch(subprocess, "check_output", return_value=self.DEVICE_ALIVE)
98 self.Patch(subprocess, "check_call", return_value=True)
102 subprocess.check_call.assert_not_called()
104 self.Patch(subprocess, "check_output", return_value=self.DEVICE_OFFLINE)
105 self.Patch(subprocess, "check_call", return_value=True)
106 subprocess.check_call.call_count = 0
110 subprocess.check_call.assert_called_with([adb_cmd._adb_command,
118 self.Patch(subprocess, "check_output", return_value=self.DEVICE_ALIVE)
119 self.Patch(subprocess, "check_call", return_value=True)
123 subprocess.check_call.assert_not_called()
125 self.Patch(subprocess, "check_output", side_effect=[self.DEVICE_OFFLINE,
127 self.Patch(subprocess, "check_call", return_value=True)
128 subprocess.check_call.call_count = 0
132 subprocess.check_call.assert_called_with([adb_cmd._adb_command,
136 self.Patch(subprocess, "check_output", return_value=self.DEVICE_NONE)
137 self.Patch(subprocess, "check_call", return_value=True)
138 subprocess.check_call.call_count = 0
142 subprocess.check_call.assert_not_called()
145 self.Patch(subprocess, "check_output", return_value=self.DEVICE_OFFLINE)
146 self.Patch(subprocess, "check_call", return_value=True)
147 subprocess.check_call.call_count = 0
157 self.Patch(subprocess, "check_output", return_value=self.DEVICE_NONE)
160 self.Patch(subprocess, "Popen", return_value=mock_popen_obj)
166 subprocess.Popen.assert_called_once_with(
168 stdin=subprocess.PIPE,
169 stdout=subprocess.PIPE,
170 stderr=subprocess.PIPE)