Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Unified Diff: tools/telemetry/telemetry/unittest/system_stub.py

Issue 128653005: [telemetry] Update examples so they work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit tests that were broken earlier. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/telemetry/telemetry/core/temporary_http_server_unittest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/unittest/system_stub.py
diff --git a/tools/telemetry/telemetry/unittest/system_stub.py b/tools/telemetry/telemetry/unittest/system_stub.py
index 10ec1ce1fea7de0edb8785198cbe2244ce04be56..1e9ddb522dbbcbcab07fdc3178544bbd23269751 100644
--- a/tools/telemetry/telemetry/unittest/system_stub.py
+++ b/tools/telemetry/telemetry/unittest/system_stub.py
@@ -20,6 +20,7 @@ class Override(object):
'open': OpenFunctionStub,
'os': OsModuleStub,
'perf_control': PerfControlModuleStub,
+ 'raw_input': RawInputFunctionStub,
'subprocess': SubprocessModuleStub,
'sys': SysModuleStub,
'thermal_throttle': ThermalThrottleModuleStub,
@@ -219,6 +220,14 @@ class PerfControlModuleStub(object):
self.PerfControl = PerfControlModuleStub.PerfControlStub
+class RawInputFunctionStub(object):
+ def __init__(self):
+ self.input = ''
+
+ def __call__(self, name, *args, **kwargs):
+ return self.input
+
+
class SubprocessModuleStub(object):
class PopenStub(object):
def __init__(self):
« no previous file with comments | « tools/telemetry/telemetry/core/temporary_http_server_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698