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

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

Issue 2729133006: Fix orphaned wpt -expected.txt file deletion logic. (Closed)
Patch Set: Remove orphan baselines; remove print line Created 3 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
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 self.assertEqual(importer.get_directory_owners(), {}) 187 self.assertEqual(importer.get_directory_owners(), {})
188 188
189 def test_cc_part(self): 189 def test_cc_part(self):
190 directory_owners = { 190 directory_owners = {
191 ('someone@chromium.org',): ['external/wpt/foo', 'external/wpt/bar'], 191 ('someone@chromium.org',): ['external/wpt/foo', 'external/wpt/bar'],
192 ('x@chromium.org', 'y@chromium.org'): ['external/wpt/baz'], 192 ('x@chromium.org', 'y@chromium.org'): ['external/wpt/baz'],
193 } 193 }
194 self.assertEqual( 194 self.assertEqual(
195 TestImporter._cc_part(directory_owners), 195 TestImporter._cc_part(directory_owners),
196 ['--cc=someone@chromium.org', '--cc=x@chromium.org', '--cc=y@chromiu m.org']) 196 ['--cc=someone@chromium.org', '--cc=x@chromium.org', '--cc=y@chromiu m.org'])
197
198 def test_delete_orphaned_baselines(self):
199 host = MockHost()
200 dest_path = '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt'
201 host.filesystem.write_text_file(dest_path + '/b-expected.txt', '')
202 host.filesystem.write_text_file(dest_path + '/b.x-expected.txt', '')
203 host.filesystem.write_text_file(dest_path + '/b.x.html', '')
204 importer = TestImporter(host)
205 importer._delete_orphaned_baselines(dest_path)
206 self.assertFalse(host.filesystem.exists(dest_path + '/b-expected.txt'))
207 self.assertTrue(host.filesystem.exists(dest_path + '/b.x-expected.txt'))
208 self.assertTrue(host.filesystem.exists(dest_path + '/b.x.html'))
OLDNEW
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698