telemetry.unittest.system_stub
index
telemetry/unittest/system_stub.py

Provides stubs for os, sys and subprocess for testing
 
This test allows one to test code that itself uses os, sys, and subprocess.

 
Modules
       
os
re
shlex
sys

 
Classes
       
__builtin__.object
AdbCommandsModuleStub
CloudStorageModuleStub
OpenFunctionStub
OsModuleStub
Override
PerfControlModuleStub
RawInputFunctionStub
SubprocessModuleStub
SysModuleStub
ThermalThrottleModuleStub

 
class AdbCommandsModuleStub(__builtin__.object)
     Methods defined here:
CleanupLeftoverProcesses(self)
GetAttachedDevices(self)
SetupPrebuiltTools(self, _)
__init__(self)

Static methods defined here:
IsAndroidSupported()

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes defined here:
AdbCommandsStub = <class 'telemetry.unittest.system_stub.AdbCommandsStub'>

 
class CloudStorageModuleStub(__builtin__.object)
     Methods defined here:
GetHash(self, file_path)
Insert(self, bucket, remote_path, local_path)
List(self, _)
__init__(self)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes defined here:
CloudStorageError = <class 'telemetry.unittest.system_stub.CloudStorageError'>
INTERNAL_BUCKET = None
PUBLIC_BUCKET = None

 
class OpenFunctionStub(__builtin__.object)
     Methods defined here:
__call__(self, name, *args, **kwargs)
__init__(self)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes defined here:
FileStub = <class 'telemetry.unittest.system_stub.FileStub'>

 
class OsModuleStub(__builtin__.object)
     Methods defined here:
__init__(self, sys_module=<module 'sys' (built-in)>)
access(self, path, _)
getenv(self, name)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes defined here:
OsPathModuleStub = <class 'telemetry.unittest.system_stub.OsPathModuleStub'>
X_OK = 1

 
class Override(__builtin__.object)
     Methods defined here:
Restore(self)
__del__(self)
__init__(self, base_module, module_list)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class PerfControlModuleStub(__builtin__.object)
     Methods defined here:
__init__(self)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes defined here:
PerfControlStub = <class 'telemetry.unittest.system_stub.PerfControlStub'>

 
class RawInputFunctionStub(__builtin__.object)
     Methods defined here:
__call__(self, name, *args, **kwargs)
__init__(self)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class SubprocessModuleStub(__builtin__.object)
     Methods defined here:
__init__(self)
call(self, *args, **kwargs)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes defined here:
PopenStub = <class 'telemetry.unittest.system_stub.PopenStub'>

 
class SysModuleStub(__builtin__.object)
     Methods defined here:
__init__(self)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class ThermalThrottleModuleStub(__builtin__.object)
     Methods defined here:
__init__(self)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes defined here:
ThermalThrottleStub = <class 'telemetry.unittest.system_stub.ThermalThrottleStub'>