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

Side by Side Diff: tools/telemetry/telemetry/value/failure_unittest.py

Issue 1029263003: [telemetry] Sort imports in Telemetry and its dependents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Manual adjustments in tools/perf Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 import sys 6 import sys
7 import traceback 7 import traceback
8 import unittest 8 import unittest
9 9
10 from telemetry import page as page_module 10 from telemetry import page as page_module
11 from telemetry.page import page_set
11 from telemetry import value 12 from telemetry import value
12 from telemetry.page import page_set
13 from telemetry.value import failure 13 from telemetry.value import failure
14 14
15 15
16 class TestBase(unittest.TestCase): 16 class TestBase(unittest.TestCase):
17 def setUp(self): 17 def setUp(self):
18 self.page_set = page_set.PageSet(file_path=os.path.dirname(__file__)) 18 self.page_set = page_set.PageSet(file_path=os.path.dirname(__file__))
19 self.page_set.AddUserStory(page_module.Page( 19 self.page_set.AddUserStory(page_module.Page(
20 'http://www.bar.com/', self.page_set, self.page_set.base_dir)) 20 'http://www.bar.com/', self.page_set, self.page_set.base_dir))
21 21
22 @property 22 @property
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 d = { 55 d = {
56 'type': 'failure', 56 'type': 'failure',
57 'name': exc_info[0].__name__, 57 'name': exc_info[0].__name__,
58 'units': '', 58 'units': '',
59 'value': ''.join(traceback.format_exception(*exc_info)) 59 'value': ''.join(traceback.format_exception(*exc_info))
60 } 60 }
61 v = value.Value.FromDict(d, {}) 61 v = value.Value.FromDict(d, {})
62 62
63 self.assertTrue(isinstance(v, failure.FailureValue)) 63 self.assertTrue(isinstance(v, failure.FailureValue))
64 self.assertEquals(v.name, 'Exception') 64 self.assertEquals(v.name, 'Exception')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698