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

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

Issue 2889583003: [Telemetry][CodeHealth] Make unittests with fake platforms use fakes.FakePlatform (Closed)
Patch Set: [Telemetry][CodeHealth] Make unittests with fake platforms use fakes.FakePlatform 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 950c18460ea89714da92c6686a4fed5ea2a77385..24e2d9c0f4e7cc5b01f7aa62449658c4ac3cfade 100644
--- a/telemetry/telemetry/internal/story_runner_unittest.py
+++ b/telemetry/telemetry/internal/story_runner_unittest.py
@@ -44,23 +44,8 @@ from telemetry.wpr import archive_info
# 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
@@ -70,6 +55,7 @@ class TestSharedState(story_module.SharedState):
test, options, story_set)
self._test = test
self._current_story = None
+ self._platform = fakes.FakePlatform()
@property
def platform(self):
@@ -732,7 +718,7 @@ class StoryRunnerTest(unittest.TestCase):
self, num_failing_stories, runner_max_failures, options_max_failures,
expected_num_failures):
class SimpleSharedState(story_module.SharedState):
- _fake_platform = FakePlatform()
+ _fake_platform = fakes.FakePlatform()
_current_story = None
@property

Powered by Google App Engine
This is Rietveld 408576698