| OLD | NEW |
| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 self.assertEqual(importer.get_directory_owners(), {('someone@chromium.or
g',): ['external/wpt/foo']}) | 176 self.assertEqual(importer.get_directory_owners(), {('someone@chromium.or
g',): ['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(), {}) |
| 186 |
| 187 def test_cc_part(self): |
| 188 directory_owners = { |
| 189 ('someone@chromium.org',): ['external/wpt/foo', 'external/wpt/bar'], |
| 190 ('x@chromium.org', 'y@chromium.org'): ['external/wpt/baz'], |
| 191 } |
| 192 self.assertEqual( |
| 193 TestImporter._cc_part(directory_owners), |
| 194 ['--cc=someone@chromium.org', '--cc=x@chromium.org', '--cc=y@chromiu
m.org']) |
| OLD | NEW |