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

Unified Diff: telemetry/telemetry/internal/story_runner_unittest.py

Issue 2887963002: Revert of [Telemetry][CodeHealth] Make unittests with fake platforms use fakes.FakePlatform (Closed)
Patch Set: Created 3 years, 7 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
Index: telemetry/telemetry/internal/story_runner_unittest.py
diff --git a/telemetry/telemetry/internal/story_runner_unittest.py b/telemetry/telemetry/internal/story_runner_unittest.py
index 24e2d9c0f4e7cc5b01f7aa62449658c4ac3cfade..950c18460ea89714da92c6686a4fed5ea2a77385 100644
--- a/telemetry/telemetry/internal/story_runner_unittest.py
+++ b/telemetry/telemetry/internal/story_runner_unittest.py
@@ -44,8 +44,23 @@
# pylint: disable=too-many-lines
+class FakePlatform(object):
+ def CanMonitorThermalThrottling(self):
+ return False
+
+ def GetOSName(self):
+ pass
+
+ def WaitForBatteryTemperature(self, _):
+ pass
+
+ def GetDeviceTypeName(self):
+ return "GetDeviceTypeName"
class TestSharedState(story_module.SharedState):
+
+ _platform = FakePlatform()
+
@classmethod
def SetTestPlatform(cls, platform):
cls._platform = platform
@@ -55,7 +70,6 @@
test, options, story_set)
self._test = test
self._current_story = None
- self._platform = fakes.FakePlatform()
@property
def platform(self):
@@ -718,7 +732,7 @@
self, num_failing_stories, runner_max_failures, options_max_failures,
expected_num_failures):
class SimpleSharedState(story_module.SharedState):
- _fake_platform = fakes.FakePlatform()
+ _fake_platform = FakePlatform()
_current_story = None
@property

Powered by Google App Engine
This is Rietveld 408576698