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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py

Issue 2684423004: WPT Auto-import: fix for owner list in import CLs. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/directory_owners_extractor_unittest.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 collections 5 import collections
6 6
7 from webkitpy.common.checkout.git_mock import MockGit 7 from webkitpy.common.checkout.git_mock import MockGit
8 from webkitpy.common.host_mock import MockHost 8 from webkitpy.common.host_mock import MockHost
9 from webkitpy.common.system.executive_mock import MockExecutive 9 from webkitpy.common.system.executive_mock import MockExecutive
10 from webkitpy.common.system.log_testing import LoggingTestCase 10 from webkitpy.common.system.log_testing import LoggingTestCase
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 def test_get_directory_owners(self): 166 def test_get_directory_owners(self):
167 host = MockHost() 167 host = MockHost()
168 host.filesystem.write_text_file( 168 host.filesystem.write_text_file(
169 '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectations ', 169 '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectations ',
170 '## Owners: someone@chromium.org\n' 170 '## Owners: someone@chromium.org\n'
171 '# external/wpt/foo [ Pass ]\n') 171 '# external/wpt/foo [ Pass ]\n')
172 git = MockGit() 172 git = MockGit()
173 git.changed_files = lambda: ['third_party/WebKit/LayoutTests/external/wp t/foo/x.html'] 173 git.changed_files = lambda: ['third_party/WebKit/LayoutTests/external/wp t/foo/x.html']
174 host.git = lambda: git 174 host.git = lambda: git
175 importer = TestImporter(host) 175 importer = TestImporter(host)
176 self.assertEqual(importer.get_directory_owners(), {'someone@chromium.org ': 'external/wpt/foo'}) 176 self.assertEqual(importer.get_directory_owners(), {'someone@chromium.org ': ['external/wpt/foo']})
177 177
178 def test_get_directory_owners_no_changed_files(self): 178 def test_get_directory_owners_no_changed_files(self):
179 host = MockHost() 179 host = MockHost()
180 host.filesystem.write_text_file( 180 host.filesystem.write_text_file(
181 '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectations ', 181 '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectations ',
182 '## Owners: someone@chromium.org\n' 182 '## Owners: someone@chromium.org\n'
183 '# external/wpt/foo [ Pass ]\n') 183 '# external/wpt/foo [ Pass ]\n')
184 importer = TestImporter(host) 184 importer = TestImporter(host)
185 self.assertEqual(importer.get_directory_owners(), {}) 185 self.assertEqual(importer.get_directory_owners(), {})
OLDNEW
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/directory_owners_extractor_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698