| 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 unittest | 5 import unittest |
| 6 | 6 |
| 7 from webkitpy.common.host_mock import MockHost | 7 from webkitpy.common.host_mock import MockHost |
| 8 from webkitpy.common.system.executive_mock import MockExecutive | 8 from webkitpy.common.system.executive_mock import MockExecutive |
| 9 from webkitpy.w3c.test_importer import TestImporter | 9 from webkitpy.w3c.test_importer import TestImporter |
| 10 | 10 |
| 11 | 11 |
| 12 class TestImporterTest(unittest.TestCase): | 12 class TestImporterTest(unittest.TestCase): |
| 13 | 13 |
| 14 def test_abort_on_exportable_commits(self): |
| 15 importer = TestImporter(MockHost()) |
| 16 importer.exportable_but_not_exported_commits = lambda _: ['aaaa'] |
| 17 return_code = importer.main(['wpt']) |
| 18 self.assertEqual(return_code, 1) |
| 19 |
| 14 def test_update_test_expectations(self): | 20 def test_update_test_expectations(self): |
| 15 host = MockHost() | 21 host = MockHost() |
| 16 host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/Tes
tExpectations'] = ( | 22 host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/Tes
tExpectations'] = ( |
| 17 'Bug(test) some/test/a.html [ Failure ]\n' | 23 'Bug(test) some/test/a.html [ Failure ]\n' |
| 18 'Bug(test) some/test/b.html [ Failure ]\n' | 24 'Bug(test) some/test/b.html [ Failure ]\n' |
| 19 'Bug(test) some/test/c.html [ Failure ]\n') | 25 'Bug(test) some/test/c.html [ Failure ]\n') |
| 20 host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/Vir
tualTestSuites'] = '[]' | 26 host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/Vir
tualTestSuites'] = '[]' |
| 21 host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/new
/a.html'] = '' | 27 host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/new
/a.html'] = '' |
| 22 host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/new
/b.html'] = '' | 28 host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/new
/b.html'] = '' |
| 23 importer = TestImporter(host) | 29 importer = TestImporter(host) |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 '--work', | 120 '--work', |
| 115 '--tests-root', | 121 '--tests-root', |
| 116 '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt' | 122 '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt' |
| 117 ], | 123 ], |
| 118 [ | 124 [ |
| 119 'git', | 125 'git', |
| 120 'add', | 126 'add', |
| 121 '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt/
MANIFEST.json' | 127 '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt/
MANIFEST.json' |
| 122 ] | 128 ] |
| 123 ]) | 129 ]) |
| OLD | NEW |