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

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

Issue 445793004: Fix import order with isort tool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 4 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 unittest 8 import unittest
8 import traceback
9 9
10 from telemetry import value 10 from telemetry import value
11 from telemetry.page import page_set 11 from telemetry.page import page_set
12 from telemetry.value import failure 12 from telemetry.value import failure
13 13
14
14 class TestBase(unittest.TestCase): 15 class TestBase(unittest.TestCase):
15 def setUp(self): 16 def setUp(self):
16 self.page_set = page_set.PageSet(file_path=os.path.dirname(__file__)) 17 self.page_set = page_set.PageSet(file_path=os.path.dirname(__file__))
17 self.page_set.AddPageWithDefaultRunNavigate("http://www.bar.com/") 18 self.page_set.AddPageWithDefaultRunNavigate("http://www.bar.com/")
18 19
19 @property 20 @property
20 def pages(self): 21 def pages(self):
21 return self.page_set.pages 22 return self.page_set.pages
22 23
23 class ValueTest(TestBase): 24 class ValueTest(TestBase):
(...skipping 28 matching lines...) Expand all
52 d = { 53 d = {
53 'type': 'failure', 54 'type': 'failure',
54 'name': exc_info[0].__name__, 55 'name': exc_info[0].__name__,
55 'units': '', 56 'units': '',
56 'value': ''.join(traceback.format_exception(*exc_info)) 57 'value': ''.join(traceback.format_exception(*exc_info))
57 } 58 }
58 v = value.Value.FromDict(d, {}) 59 v = value.Value.FromDict(d, {})
59 60
60 self.assertTrue(isinstance(v, failure.FailureValue)) 61 self.assertTrue(isinstance(v, failure.FailureValue))
61 self.assertEquals(v.name, 'Exception') 62 self.assertEquals(v.name, 'Exception')
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/value/failure.py ('k') | tools/telemetry/telemetry/value/histogram.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698