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

Side by Side Diff: tools/perf/profile_creators/history_profile_extender_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: Ensure we're up to date. 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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 import os 4 import os
5 import shutil 5 import shutil
6 import tempfile 6 import tempfile
7 import unittest 7 import unittest
8 8
9 from profile_creators.history_profile_extender import HistoryProfileExtender 9 from profile_creators.history_profile_extender import HistoryProfileExtender
10 from telemetry.core import util
10 from telemetry import decorators 11 from telemetry import decorators
11 from telemetry.core import util
12 from telemetry.unittest_util import options_for_unittests 12 from telemetry.unittest_util import options_for_unittests
13 13
14 util.AddDirToPythonPath(util.GetTelemetryDir(), 'third_party', 'mock') 14 util.AddDirToPythonPath(util.GetTelemetryDir(), 'third_party', 'mock')
15 import mock 15 import mock
16 16
17 17
18 # Testing private method. 18 # Testing private method.
19 # pylint: disable=protected-access 19 # pylint: disable=protected-access
20 class HistoryProfileExtenderTest(unittest.TestCase): 20 class HistoryProfileExtenderTest(unittest.TestCase):
21 # The profile extender does not work on Android or ChromeOS. 21 # The profile extender does not work on Android or ChromeOS.
(...skipping 13 matching lines...) Expand all
35 try: 35 try:
36 extender.Run(options) 36 extender.Run(options)
37 self.assertEquals(extender.profile_path, options.output_profile_path) 37 self.assertEquals(extender.profile_path, options.output_profile_path)
38 self.assertTrue(os.path.exists(extender.profile_path)) 38 self.assertTrue(os.path.exists(extender.profile_path))
39 history_db_path = os.path.join(extender.profile_path, "Default", 39 history_db_path = os.path.join(extender.profile_path, "Default",
40 "History") 40 "History")
41 stat_info = os.stat(history_db_path) 41 stat_info = os.stat(history_db_path)
42 self.assertGreater(stat_info.st_size, 1000) 42 self.assertGreater(stat_info.st_size, 1000)
43 finally: 43 finally:
44 shutil.rmtree(options.output_profile_path) 44 shutil.rmtree(options.output_profile_path)
OLDNEW
« no previous file with comments | « tools/perf/profile_creators/history_profile_extender.py ('k') | tools/telemetry/examples/measure_trace.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698