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

Unified Diff: tracing/tracing/value/add_shared_diagnostic_unittest.py

Issue 3000643002: [Tracing] Add add_shared_diagnostics.AddValueDiagnostics (Closed)
Patch Set: fix test Created 3 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: tracing/tracing/value/add_shared_diagnostic_unittest.py
diff --git a/tracing/tracing/value/add_shared_diagnostic_unittest.py b/tracing/tracing/value/add_shared_diagnostic_unittest.py
deleted file mode 100644
index 6f777abe368ff5d393d0c5b7a3c0c86ef7f8fc66..0000000000000000000000000000000000000000
--- a/tracing/tracing/value/add_shared_diagnostic_unittest.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 2017 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.
-
-import json
-import tempfile
-import unittest
-
-from tracing.value import add_shared_diagnostic
-from tracing.value import histogram
-from tracing.value import histogram_set
-
-
-class AddSharedDiagnosticTest(unittest.TestCase):
- def testAddSharedDiagnostic(self):
- hf = tempfile.NamedTemporaryFile(delete=False)
- h = histogram.Histogram('foo', 'count')
- hs = histogram_set.HistogramSet([h])
- json.dump(hs.AsDicts(), hf)
- hf.close()
-
- df = tempfile.NamedTemporaryFile(delete=False)
- d = histogram.GenericSet(['bar'])
- json.dump(d.AsDict(), df)
- df.close()
-
- new_hs_data = add_shared_diagnostic.AddSharedDiagnostic(
- hf.name, 'foo', df.name).stdout
- new_hs = histogram_set.HistogramSet()
- new_hs.ImportDicts(json.loads(new_hs_data))
- new_hs.ResolveRelatedHistograms()
- new_h = new_hs.GetFirstHistogram()
-
- self.assertEqual(new_h.diagnostics['foo'], d)
« no previous file with comments | « tracing/tracing/value/add_shared_diagnostic_cmdline.html ('k') | tracing/tracing/value/add_shared_diagnostics.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698