2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3 <html><head><title>Python: module telemetry.unittest.system_stub</title>
4 </head><body bgcolor="#f0f0f8">
6 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
8 <td valign=bottom> <br>
9 <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.unittest.html"><font color="#ffffff">unittest</font></a>.system_stub</strong></big></big></font></td
10 ><td align=right valign=bottom
11 ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/unittest/system_stub.py">telemetry/unittest/system_stub.py</a></font></td></tr></table>
12 <p><tt>Provides stubs for os, sys and subprocess for testing<br>
14 This test allows one to test code that itself uses os, sys, and subprocess.</tt></p>
16 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
17 <tr bgcolor="#aa55cc">
18 <td colspan=3 valign=bottom> <br>
19 <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
21 <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
22 <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="os.html">os</a><br>
23 </td><td width="25%" valign=top><a href="re.html">re</a><br>
24 </td><td width="25%" valign=top><a href="shlex.html">shlex</a><br>
25 </td><td width="25%" valign=top><a href="sys.html">sys</a><br>
26 </td></tr></table></td></tr></table><p>
27 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
28 <tr bgcolor="#ee77aa">
29 <td colspan=3 valign=bottom> <br>
30 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
32 <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
34 <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
37 <dt><font face="helvetica, arial"><a href="telemetry.unittest.system_stub.html#AdbCommandsModuleStub">AdbCommandsModuleStub</a>
38 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.unittest.system_stub.html#CloudStorageModuleStub">CloudStorageModuleStub</a>
39 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.unittest.system_stub.html#OpenFunctionStub">OpenFunctionStub</a>
40 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.unittest.system_stub.html#OsModuleStub">OsModuleStub</a>
41 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.unittest.system_stub.html#Override">Override</a>
42 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.unittest.system_stub.html#PerfControlModuleStub">PerfControlModuleStub</a>
43 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.unittest.system_stub.html#RawInputFunctionStub">RawInputFunctionStub</a>
44 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.unittest.system_stub.html#SubprocessModuleStub">SubprocessModuleStub</a>
45 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.unittest.system_stub.html#SysModuleStub">SysModuleStub</a>
46 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.unittest.system_stub.html#ThermalThrottleModuleStub">ThermalThrottleModuleStub</a>
51 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
52 <tr bgcolor="#ffc8d8">
53 <td colspan=3 valign=bottom> <br>
54 <font color="#000000" face="helvetica, arial"><a name="AdbCommandsModuleStub">class <strong>AdbCommandsModuleStub</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
56 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
57 <td width="100%">Methods defined here:<br>
58 <dl><dt><a name="AdbCommandsModuleStub-CleanupLeftoverProcesses"><strong>CleanupLeftoverProcesses</strong></a>(self)</dt></dl>
60 <dl><dt><a name="AdbCommandsModuleStub-GetAttachedDevices"><strong>GetAttachedDevices</strong></a>(self)</dt></dl>
62 <dl><dt><a name="AdbCommandsModuleStub-SetupPrebuiltTools"><strong>SetupPrebuiltTools</strong></a>(self, _)</dt></dl>
64 <dl><dt><a name="AdbCommandsModuleStub-__init__"><strong>__init__</strong></a>(self)</dt></dl>
67 Static methods defined here:<br>
68 <dl><dt><a name="AdbCommandsModuleStub-IsAndroidSupported"><strong>IsAndroidSupported</strong></a>()</dt></dl>
71 Data descriptors defined here:<br>
72 <dl><dt><strong>__dict__</strong></dt>
73 <dd><tt>dictionary for instance variables (if defined)</tt></dd>
75 <dl><dt><strong>__weakref__</strong></dt>
76 <dd><tt>list of weak references to the object (if defined)</tt></dd>
79 Data and other attributes defined here:<br>
80 <dl><dt><strong>AdbCommandsStub</strong> = <class 'telemetry.unittest.system_stub.AdbCommandsStub'></dl>
82 </td></tr></table> <p>
83 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
84 <tr bgcolor="#ffc8d8">
85 <td colspan=3 valign=bottom> <br>
86 <font color="#000000" face="helvetica, arial"><a name="CloudStorageModuleStub">class <strong>CloudStorageModuleStub</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
88 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
89 <td width="100%">Methods defined here:<br>
90 <dl><dt><a name="CloudStorageModuleStub-GetHash"><strong>GetHash</strong></a>(self, file_path)</dt></dl>
92 <dl><dt><a name="CloudStorageModuleStub-Insert"><strong>Insert</strong></a>(self, bucket, remote_path, local_path)</dt></dl>
94 <dl><dt><a name="CloudStorageModuleStub-List"><strong>List</strong></a>(self, _)</dt></dl>
96 <dl><dt><a name="CloudStorageModuleStub-__init__"><strong>__init__</strong></a>(self)</dt></dl>
99 Data descriptors defined here:<br>
100 <dl><dt><strong>__dict__</strong></dt>
101 <dd><tt>dictionary for instance variables (if defined)</tt></dd>
103 <dl><dt><strong>__weakref__</strong></dt>
104 <dd><tt>list of weak references to the object (if defined)</tt></dd>
107 Data and other attributes defined here:<br>
108 <dl><dt><strong>CloudStorageError</strong> = <class 'telemetry.unittest.system_stub.CloudStorageError'></dl>
110 <dl><dt><strong>INTERNAL_BUCKET</strong> = None</dl>
112 <dl><dt><strong>PUBLIC_BUCKET</strong> = None</dl>
114 </td></tr></table> <p>
115 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
116 <tr bgcolor="#ffc8d8">
117 <td colspan=3 valign=bottom> <br>
118 <font color="#000000" face="helvetica, arial"><a name="OpenFunctionStub">class <strong>OpenFunctionStub</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
120 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
121 <td width="100%">Methods defined here:<br>
122 <dl><dt><a name="OpenFunctionStub-__call__"><strong>__call__</strong></a>(self, name, *args, **kwargs)</dt></dl>
124 <dl><dt><a name="OpenFunctionStub-__init__"><strong>__init__</strong></a>(self)</dt></dl>
127 Data descriptors defined here:<br>
128 <dl><dt><strong>__dict__</strong></dt>
129 <dd><tt>dictionary for instance variables (if defined)</tt></dd>
131 <dl><dt><strong>__weakref__</strong></dt>
132 <dd><tt>list of weak references to the object (if defined)</tt></dd>
135 Data and other attributes defined here:<br>
136 <dl><dt><strong>FileStub</strong> = <class 'telemetry.unittest.system_stub.FileStub'></dl>
138 </td></tr></table> <p>
139 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
140 <tr bgcolor="#ffc8d8">
141 <td colspan=3 valign=bottom> <br>
142 <font color="#000000" face="helvetica, arial"><a name="OsModuleStub">class <strong>OsModuleStub</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
144 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
145 <td width="100%">Methods defined here:<br>
146 <dl><dt><a name="OsModuleStub-__init__"><strong>__init__</strong></a>(self, sys_module<font color="#909090">=<module 'sys' (built-in)></font>)</dt></dl>
148 <dl><dt><a name="OsModuleStub-access"><strong>access</strong></a>(self, path, _)</dt></dl>
150 <dl><dt><a name="OsModuleStub-getenv"><strong>getenv</strong></a>(self, name)</dt></dl>
153 Data descriptors defined here:<br>
154 <dl><dt><strong>__dict__</strong></dt>
155 <dd><tt>dictionary for instance variables (if defined)</tt></dd>
157 <dl><dt><strong>__weakref__</strong></dt>
158 <dd><tt>list of weak references to the object (if defined)</tt></dd>
161 Data and other attributes defined here:<br>
162 <dl><dt><strong>OsPathModuleStub</strong> = <class 'telemetry.unittest.system_stub.OsPathModuleStub'></dl>
164 <dl><dt><strong>X_OK</strong> = 1</dl>
166 </td></tr></table> <p>
167 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
168 <tr bgcolor="#ffc8d8">
169 <td colspan=3 valign=bottom> <br>
170 <font color="#000000" face="helvetica, arial"><a name="Override">class <strong>Override</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
172 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
173 <td width="100%">Methods defined here:<br>
174 <dl><dt><a name="Override-Restore"><strong>Restore</strong></a>(self)</dt></dl>
176 <dl><dt><a name="Override-__del__"><strong>__del__</strong></a>(self)</dt></dl>
178 <dl><dt><a name="Override-__init__"><strong>__init__</strong></a>(self, base_module, module_list)</dt></dl>
181 Data descriptors defined here:<br>
182 <dl><dt><strong>__dict__</strong></dt>
183 <dd><tt>dictionary for instance variables (if defined)</tt></dd>
185 <dl><dt><strong>__weakref__</strong></dt>
186 <dd><tt>list of weak references to the object (if defined)</tt></dd>
188 </td></tr></table> <p>
189 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
190 <tr bgcolor="#ffc8d8">
191 <td colspan=3 valign=bottom> <br>
192 <font color="#000000" face="helvetica, arial"><a name="PerfControlModuleStub">class <strong>PerfControlModuleStub</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
194 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
195 <td width="100%">Methods defined here:<br>
196 <dl><dt><a name="PerfControlModuleStub-__init__"><strong>__init__</strong></a>(self)</dt></dl>
199 Data descriptors defined here:<br>
200 <dl><dt><strong>__dict__</strong></dt>
201 <dd><tt>dictionary for instance variables (if defined)</tt></dd>
203 <dl><dt><strong>__weakref__</strong></dt>
204 <dd><tt>list of weak references to the object (if defined)</tt></dd>
207 Data and other attributes defined here:<br>
208 <dl><dt><strong>PerfControlStub</strong> = <class 'telemetry.unittest.system_stub.PerfControlStub'></dl>
210 </td></tr></table> <p>
211 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
212 <tr bgcolor="#ffc8d8">
213 <td colspan=3 valign=bottom> <br>
214 <font color="#000000" face="helvetica, arial"><a name="RawInputFunctionStub">class <strong>RawInputFunctionStub</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
216 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
217 <td width="100%">Methods defined here:<br>
218 <dl><dt><a name="RawInputFunctionStub-__call__"><strong>__call__</strong></a>(self, name, *args, **kwargs)</dt></dl>
220 <dl><dt><a name="RawInputFunctionStub-__init__"><strong>__init__</strong></a>(self)</dt></dl>
223 Data descriptors defined here:<br>
224 <dl><dt><strong>__dict__</strong></dt>
225 <dd><tt>dictionary for instance variables (if defined)</tt></dd>
227 <dl><dt><strong>__weakref__</strong></dt>
228 <dd><tt>list of weak references to the object (if defined)</tt></dd>
230 </td></tr></table> <p>
231 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
232 <tr bgcolor="#ffc8d8">
233 <td colspan=3 valign=bottom> <br>
234 <font color="#000000" face="helvetica, arial"><a name="SubprocessModuleStub">class <strong>SubprocessModuleStub</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
236 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
237 <td width="100%">Methods defined here:<br>
238 <dl><dt><a name="SubprocessModuleStub-__init__"><strong>__init__</strong></a>(self)</dt></dl>
240 <dl><dt><a name="SubprocessModuleStub-call"><strong>call</strong></a>(self, *args, **kwargs)</dt></dl>
243 Data descriptors defined here:<br>
244 <dl><dt><strong>__dict__</strong></dt>
245 <dd><tt>dictionary for instance variables (if defined)</tt></dd>
247 <dl><dt><strong>__weakref__</strong></dt>
248 <dd><tt>list of weak references to the object (if defined)</tt></dd>
251 Data and other attributes defined here:<br>
252 <dl><dt><strong>PopenStub</strong> = <class 'telemetry.unittest.system_stub.PopenStub'></dl>
254 </td></tr></table> <p>
255 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
256 <tr bgcolor="#ffc8d8">
257 <td colspan=3 valign=bottom> <br>
258 <font color="#000000" face="helvetica, arial"><a name="SysModuleStub">class <strong>SysModuleStub</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
260 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
261 <td width="100%">Methods defined here:<br>
262 <dl><dt><a name="SysModuleStub-__init__"><strong>__init__</strong></a>(self)</dt></dl>
265 Data descriptors defined here:<br>
266 <dl><dt><strong>__dict__</strong></dt>
267 <dd><tt>dictionary for instance variables (if defined)</tt></dd>
269 <dl><dt><strong>__weakref__</strong></dt>
270 <dd><tt>list of weak references to the object (if defined)</tt></dd>
272 </td></tr></table> <p>
273 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
274 <tr bgcolor="#ffc8d8">
275 <td colspan=3 valign=bottom> <br>
276 <font color="#000000" face="helvetica, arial"><a name="ThermalThrottleModuleStub">class <strong>ThermalThrottleModuleStub</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
278 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
279 <td width="100%">Methods defined here:<br>
280 <dl><dt><a name="ThermalThrottleModuleStub-__init__"><strong>__init__</strong></a>(self)</dt></dl>
283 Data descriptors defined here:<br>
284 <dl><dt><strong>__dict__</strong></dt>
285 <dd><tt>dictionary for instance variables (if defined)</tt></dd>
287 <dl><dt><strong>__weakref__</strong></dt>
288 <dd><tt>list of weak references to the object (if defined)</tt></dd>
291 Data and other attributes defined here:<br>
292 <dl><dt><strong>ThermalThrottleStub</strong> = <class 'telemetry.unittest.system_stub.ThermalThrottleStub'></dl>
294 </td></tr></table></td></tr></table>