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

Unified Diff: infra/tools/metric_tool/test/data/other_tests.py

Issue 1368583005: Create metric_tool to deal with metric definitions (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase Created 5 years, 3 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: infra/tools/metric_tool/test/data/other_tests.py
diff --git a/infra/tools/metric_tool/test/data/other_tests.py b/infra/tools/metric_tool/test/data/other_tests.py
new file mode 100644
index 0000000000000000000000000000000000000000..7e91fb9e5e24f803beae0734749f6ad61f2d4f33
--- /dev/null
+++ b/infra/tools/metric_tool/test/data/other_tests.py
@@ -0,0 +1,18 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""This file is meant to exercise weird cases in metric_tool.py"""
+
+import infra_libs
+
+def nice_function():
+ # Calling of function as an attribute which is not a *Metric()
+ infra_libs.read_json_as_utf8()
+
+ # Wrong type passed to 'description'
+ infra_libs.ts_mon.BooleanMetric('/my/metric', description=1)
+
+def other_function():
+ # Function call that is not a metric instantiation.
+ nice_function()
« no previous file with comments | « infra/tools/metric_tool/test/data/normal_case_2.py ('k') | infra/tools/metric_tool/test/metric_tool_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698