| 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 copy | 5 import copy |
| 6 | 6 |
| 7 from webkitpy.common.host_mock import MockHost | 7 from webkitpy.common.host_mock import MockHost |
| 8 from webkitpy.common.net.buildbot import Build | 8 from webkitpy.common.net.buildbot import Build |
| 9 from webkitpy.common.net.buildbot_mock import MockBuildBot | 9 from webkitpy.common.net.buildbot_mock import MockBuildBot |
| 10 from webkitpy.common.net.layout_test_results import LayoutTestResult, LayoutTest
Results | 10 from webkitpy.common.net.layout_test_results import LayoutTestResult, LayoutTest
Results |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 | 419 |
| 420 def test_run_no_issue_number(self): | 420 def test_run_no_issue_number(self): |
| 421 # TODO(qyearsley): For testing: Consider making a MockGitCL class | 421 # TODO(qyearsley): For testing: Consider making a MockGitCL class |
| 422 # and use that class to set fake return values when using git cl. | 422 # and use that class to set fake return values when using git cl. |
| 423 updater = WPTExpectationsUpdater(self.mock_host()) | 423 updater = WPTExpectationsUpdater(self.mock_host()) |
| 424 updater.get_issue_number = lambda: 'None' | 424 updater.get_issue_number = lambda: 'None' |
| 425 self.assertEqual(1, updater.run(args=[])) | 425 self.assertEqual(1, updater.run(args=[])) |
| 426 self.assertLog(['ERROR: No issue on current branch.\n']) | 426 self.assertLog(['ERROR: No issue on current branch.\n']) |
| 427 | 427 |
| 428 def test_run_no_try_results(self): | 428 def test_run_no_try_results(self): |
| 429 host = self.mock_host() | 429 updater = WPTExpectationsUpdater(self.mock_host()) |
| 430 updater = WPTExpectationsUpdater(host) | |
| 431 updater.get_latest_try_jobs = lambda: [] | 430 updater.get_latest_try_jobs = lambda: [] |
| 432 self.assertEqual(1, updater.run(args=[])) | 431 self.assertEqual(1, updater.run(args=[])) |
| 433 self.assertLog(['ERROR: No try job information was collected.\n']) | 432 self.assertLog(['ERROR: No try job information was collected.\n']) |
| OLD | NEW |