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

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

Issue 2665463003: Print commit shas when there are exportable and not exported commits. (Closed)
Patch Set: Log URLs of exportable commits, add test Created 3 years, 11 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
index 2af21d19a664915e05e17db5f857fec51f599ce9..e8da8e36bd77b9d85aee9c5ebe8f2b26217b9e47 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
@@ -2,21 +2,35 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import unittest
+import collections
from webkitpy.common.checkout.scm.git_mock import MockGit
from webkitpy.common.host_mock import MockHost
from webkitpy.common.system.executive_mock import MockExecutive
+from webkitpy.common.system.log_testing import LoggingTestCase
from webkitpy.w3c.test_importer import TestImporter
-class TestImporterTest(unittest.TestCase):
+MockChromiumCommit = collections.namedtuple('ChromiumCommit', ('sha', 'position'))
+
+
+class TestImporterTest(LoggingTestCase):
def test_abort_on_exportable_commits(self):
importer = TestImporter(MockHost())
- importer.exportable_but_not_exported_commits = lambda _: ['aaaa']
+ importer.exportable_but_not_exported_commits = lambda _: [
+ MockChromiumCommit(sha='deadbeef', position=123)]
+ importer.checkout_is_okay = lambda _: True
return_code = importer.main(['wpt'])
self.assertEqual(return_code, 1)
+ self.assertLog([
+ 'INFO: Noting the current Chromium commit.\n',
+ ('INFO: Cloning https://chromium.googlesource.com/external/w3c/web-platform-tests.git '
+ 'into /mock-checkout/third_party/WebKit/wpt.\n'),
+ 'ERROR: There were exportable but not-yet-exported commits:\n',
+ 'ERROR: https://chromium.googlesource.com/chromium/src/+/deadbeef\n',
+ 'ERROR: Aborting import to prevent clobbering these commits.\n'
+ ])
def test_update_test_expectations(self):
host = MockHost()
« 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