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

Unified Diff: telemetry/telemetry/internal/results/valueset_output_formatter_unittest.py

Issue 2538043005: Replace ValueSetOutputFormatter with HistogramSetJsonOutputFormatter. (Closed)
Patch Set: rebase Created 4 years 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 | « telemetry/telemetry/internal/results/valueset_output_formatter.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/internal/results/valueset_output_formatter_unittest.py
diff --git a/telemetry/telemetry/internal/results/valueset_output_formatter_unittest.py b/telemetry/telemetry/internal/results/valueset_output_formatter_unittest.py
deleted file mode 100644
index 3dd83a2fa2cf241d7ad3a3e20677afaefa9594ef..0000000000000000000000000000000000000000
--- a/telemetry/telemetry/internal/results/valueset_output_formatter_unittest.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 2014 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 os
-import tempfile
-import unittest
-
-from telemetry.internal.results import valueset_output_formatter
-from telemetry.internal.results import page_test_results
-
-
-class ValueSetOutputFormatterTest(unittest.TestCase):
-
- def setUp(self):
- self.output_file_path = tempfile.mkstemp()[1]
-
- def tearDown(self):
- try:
- os.remove(self.output_file_path)
- except OSError:
- pass
-
- def test_basic_summary(self):
- sample = {
- 'name': 'a',
- 'guid': '42',
- 'description': 'desc',
- 'important': False,
- 'diagnostics': [],
- 'type': 'numeric',
- 'numeric': {
- 'unit': 'n%',
- 'type': 'scalar',
- 'value': 42
- }
- }
-
- results = page_test_results.PageTestResults()
- results.value_set.extend([sample])
-
- with open(self.output_file_path, 'w') as output_file:
- formatter = valueset_output_formatter.ValueSetOutputFormatter(output_file)
- formatter.Format(results)
-
- written_data = json.load(open(self.output_file_path))
- self.assertEqual([sample], written_data)
-
« no previous file with comments | « telemetry/telemetry/internal/results/valueset_output_formatter.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698