1 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"> 5 6 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> 7 <tr bgcolor="#7799ee"> 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> 13 <br> 14 This test allows one to test code that itself uses os, sys, and subprocess.</tt></p> 15 <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> 20 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="sys.html">sys</a><br> 25 </td><td width="25%" valign=top><a href="shlex.html">shlex</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> 31 32 <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> 33 <td width="100%"><dl> 34 <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> 35 </font></dt><dd> 36 <dl> 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#OsModuleStub">OsModuleStub</a> 39 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.unittest.system_stub.html#Override">Override</a> 40 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.unittest.system_stub.html#SubprocessModuleStub">SubprocessModuleStub</a> 41 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.unittest.system_stub.html#SysModuleStub">SysModuleStub</a> 42 </font></dt></dl> 43 </dd> 44 </dl> 45 <p> 46 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 47 <tr bgcolor="#ffc8d8"> 48 <td colspan=3 valign=bottom> <br> 49 <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> 50 51 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 52 <td width="100%">Methods defined here:<br> 53 <dl><dt><a name="AdbCommandsModuleStub-GetAttachedDevices"><strong>GetAttachedDevices</strong></a>(self)</dt></dl> 54 55 <dl><dt><a name="AdbCommandsModuleStub-__init__"><strong>__init__</strong></a>(self)</dt></dl> 56 57 <hr> 58 Static methods defined here:<br> 59 <dl><dt><a name="AdbCommandsModuleStub-HasForwarder"><strong>HasForwarder</strong></a>(_<font color="#909090">=None</font>)</dt></dl> 60 61 <dl><dt><a name="AdbCommandsModuleStub-IsAndroidSupported"><strong>IsAndroidSupported</strong></a>()</dt></dl> 62 63 <hr> 64 Data descriptors defined here:<br> 65 <dl><dt><strong>__dict__</strong></dt> 66 <dd><tt>dictionary for instance variables (if defined)</tt></dd> 67 </dl> 68 <dl><dt><strong>__weakref__</strong></dt> 69 <dd><tt>list of weak references to the object (if defined)</tt></dd> 70 </dl> 71 <hr> 72 Data and other attributes defined here:<br> 73 <dl><dt><strong>AdbCommandsStub</strong> = <class 'telemetry.unittest.system_stub.AdbCommandsStub'></dl> 74 75 </td></tr></table> <p> 76 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 77 <tr bgcolor="#ffc8d8"> 78 <td colspan=3 valign=bottom> <br> 79 <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> 80 81 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 82 <td width="100%">Methods defined here:<br> 83 <dl><dt><a name="OsModuleStub-__init__"><strong>__init__</strong></a>(self, sys_module<font color="#909090">=<module 'sys' (built-in)></font>)</dt></dl> 84 85 <dl><dt><a name="OsModuleStub-getenv"><strong>getenv</strong></a>(self, name)</dt></dl> 86 87 <hr> 88 Data descriptors defined here:<br> 89 <dl><dt><strong>__dict__</strong></dt> 90 <dd><tt>dictionary for instance variables (if defined)</tt></dd> 91 </dl> 92 <dl><dt><strong>__weakref__</strong></dt> 93 <dd><tt>list of weak references to the object (if defined)</tt></dd> 94 </dl> 95 <hr> 96 Data and other attributes defined here:<br> 97 <dl><dt><strong>OsPathModuleStub</strong> = <class 'telemetry.unittest.system_stub.OsPathModuleStub'></dl> 98 99 </td></tr></table> <p> 100 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 101 <tr bgcolor="#ffc8d8"> 102 <td colspan=3 valign=bottom> <br> 103 <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> 104 105 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 106 <td width="100%">Methods defined here:<br> 107 <dl><dt><a name="Override-Restore"><strong>Restore</strong></a>(self)</dt></dl> 108 109 <dl><dt><a name="Override-__del__"><strong>__del__</strong></a>(self)</dt></dl> 110 111 <dl><dt><a name="Override-__init__"><strong>__init__</strong></a>(self, base_module, module_list)</dt></dl> 112 113 <hr> 114 Data descriptors defined here:<br> 115 <dl><dt><strong>__dict__</strong></dt> 116 <dd><tt>dictionary for instance variables (if defined)</tt></dd> 117 </dl> 118 <dl><dt><strong>__weakref__</strong></dt> 119 <dd><tt>list of weak references to the object (if defined)</tt></dd> 120 </dl> 121 </td></tr></table> <p> 122 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 123 <tr bgcolor="#ffc8d8"> 124 <td colspan=3 valign=bottom> <br> 125 <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> 126 127 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 128 <td width="100%">Methods defined here:<br> 129 <dl><dt><a name="SubprocessModuleStub-__init__"><strong>__init__</strong></a>(self)</dt></dl> 130 131 <dl><dt><a name="SubprocessModuleStub-call"><strong>call</strong></a>(self, *args, **kwargs)</dt></dl> 132 133 <hr> 134 Data descriptors defined here:<br> 135 <dl><dt><strong>__dict__</strong></dt> 136 <dd><tt>dictionary for instance variables (if defined)</tt></dd> 137 </dl> 138 <dl><dt><strong>__weakref__</strong></dt> 139 <dd><tt>list of weak references to the object (if defined)</tt></dd> 140 </dl> 141 <hr> 142 Data and other attributes defined here:<br> 143 <dl><dt><strong>PopenStub</strong> = <class 'telemetry.unittest.system_stub.PopenStub'></dl> 144 145 </td></tr></table> <p> 146 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 147 <tr bgcolor="#ffc8d8"> 148 <td colspan=3 valign=bottom> <br> 149 <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> 150 151 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 152 <td width="100%">Methods defined here:<br> 153 <dl><dt><a name="SysModuleStub-__init__"><strong>__init__</strong></a>(self)</dt></dl> 154 155 <hr> 156 Data descriptors defined here:<br> 157 <dl><dt><strong>__dict__</strong></dt> 158 <dd><tt>dictionary for instance variables (if defined)</tt></dd> 159 </dl> 160 <dl><dt><strong>__weakref__</strong></dt> 161 <dd><tt>list of weak references to the object (if defined)</tt></dd> 162 </dl> 163 </td></tr></table></td></tr></table> 164 </body></html>