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

Unified Diff: tools/telemetry/telemetry/core/platform/power_monitor/cros_power_monitor_unittest.py

Issue 485003004: [Telemetry] Chrome OS gathers power and time in one command. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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/platform/power_monitor/cros_power_monitor.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/core/platform/power_monitor/cros_power_monitor_unittest.py
diff --git a/tools/telemetry/telemetry/core/platform/power_monitor/cros_power_monitor_unittest.py b/tools/telemetry/telemetry/core/platform/power_monitor/cros_power_monitor_unittest.py
index 48d86a9ec427da40aeea2f5ce7d88cecb83a9df5..c012bbc4f4ba9cd53863f1ad67f29ff682a294fc 100644
--- a/tools/telemetry/telemetry/core/platform/power_monitor/cros_power_monitor_unittest.py
+++ b/tools/telemetry/telemetry/core/platform/power_monitor/cros_power_monitor_unittest.py
@@ -197,6 +197,12 @@ Device: Battery
self.assertAlmostEqual(results['power_samples_mw'][1],
self.expected_power['power_samples_mw'][1])
+ def testSplitSample(self):
+ sample = self.initial_power + '\n1408739546\n'
+ power, time = cros_power_monitor.CrosPowerMonitor.SplitSample(sample)
+ self.assertEqual(power, self.initial_power)
+ self.assertEqual(time, 1408739546)
+
def testCombineResults(self):
result = cros_power_monitor.CrosPowerMonitor.CombineResults(
self.expected_cpu, self.expected_power)
« no previous file with comments | « tools/telemetry/telemetry/core/platform/power_monitor/cros_power_monitor.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698