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

Unified Diff: tools/telemetry/telemetry/value/__init__.py

Issue 914083005: [Telemetry] Fix 'important' field of certain Values being non-boolean (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Ned's comment Created 5 years, 10 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 | « no previous file | tools/telemetry/telemetry/value/value_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/value/__init__.py
diff --git a/tools/telemetry/telemetry/value/__init__.py b/tools/telemetry/telemetry/value/__init__.py
index c4330ecdd92c5da1a3b24217ed9d5e43b2840694..64557c14c8195a2a57608853c1278afb1a24b235 100644
--- a/tools/telemetry/telemetry/value/__init__.py
+++ b/tools/telemetry/telemetry/value/__init__.py
@@ -57,6 +57,15 @@ class Value(object):
description: A string explaining in human-understandable terms what this
value represents.
"""
+ if page is not None:
+ # TODO(eakuefner): Change this to isinstance once page is refactored.
+ assert type(page).__name__ == 'Page'
nednguyen 2015/02/13 19:09:21 Actually, let's left page alone for now because th
eakuefner 2015/02/13 19:29:13 Fair enough. I did some fiddling in the bug tracke
+ assert isinstance(name, str)
+ assert isinstance(units, str)
+ assert isinstance(important, bool)
+ if description is not None:
+ assert isinstance(description, str)
nednguyen 2015/02/13 19:09:21 assert (not description) or isinstance(description
eakuefner 2015/02/13 19:29:13 Done, except I think (not description) is not quit
+
self.page = page
self.name = name
self.units = units
« no previous file with comments | « no previous file | tools/telemetry/telemetry/value/value_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698