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

Side by Side Diff: tools/perf/profile_creators/profile_generator_unittest.py

Issue 1005203002: Telemetry: Move ProfileCreator to tools/perf/profile_creator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 shutil 6 import shutil
7 import socket 7 import socket
8 import tempfile 8 import tempfile
9 import unittest 9 import unittest
10 10
11 from telemetry.page import profile_generator 11 from profile_creators import profile_generator
12 12
13 13
14 class ProfileGeneratorUnitTest(unittest.TestCase): 14 class ProfileGeneratorUnitTest(unittest.TestCase):
15 def setUp(self): 15 def setUp(self):
16 self.test_directory = tempfile.mkdtemp() 16 self.test_directory = tempfile.mkdtemp()
17 super(ProfileGeneratorUnitTest, self).setUp() 17 super(ProfileGeneratorUnitTest, self).setUp()
18 18
19 def _CreateFunkyFilesAndOnePlainFile(self, sandbox_directory): 19 def _CreateFunkyFilesAndOnePlainFile(self, sandbox_directory):
20 """Create several special files and one plain file in |sandbox_directory|. 20 """Create several special files and one plain file in |sandbox_directory|.
21 """ 21 """
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 shutil.copytree(sandbox_dir, sandbox_dir_copy, 59 shutil.copytree(sandbox_dir, sandbox_dir_copy,
60 ignore=profile_generator._IsPseudoFile) 60 ignore=profile_generator._IsPseudoFile)
61 61
62 # Check that only the directory and plain file got copied. 62 # Check that only the directory and plain file got copied.
63 dir_contents = os.listdir(sandbox_dir_copy) 63 dir_contents = os.listdir(sandbox_dir_copy)
64 dir_contents.sort() 64 dir_contents.sort()
65 self.assertEqual(['directory', 'plain_file'], dir_contents) 65 self.assertEqual(['directory', 'plain_file'], dir_contents)
66 66
67 def tearDown(self): 67 def tearDown(self):
68 shutil.rmtree(self.test_directory) 68 shutil.rmtree(self.test_directory)
OLDNEW
« no previous file with comments | « tools/perf/profile_creators/profile_generator.py ('k') | tools/perf/profile_creators/small_profile_creator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698