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

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

Issue 2750273003: In wpt-update-expectations, ignore tests that unexpectedly pass. (Closed)
Patch Set: 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/wpt_expectations_updater.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 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 'passing-test.html': { 62 'passing-test.html': {
63 'expected': 'PASS', 63 'expected': 'PASS',
64 'actual': 'PASS', 64 'actual': 'PASS',
65 }, 65 },
66 }, 66 },
67 }, 67 },
68 })) 68 }))
69 updater = WPTExpectationsUpdater(host) 69 updater = WPTExpectationsUpdater(host)
70 self.assertEqual(updater.get_failing_results_dict(Build('MOCK Try Mac10. 10', 123)), {}) 70 self.assertEqual(updater.get_failing_results_dict(Build('MOCK Try Mac10. 10', 123)), {})
71 71
72 def test_get_failing_results_dict_unexpected_pass(self):
73 host = self.mock_host()
74 host.buildbot.set_results(Build('MOCK Try Mac10.10', 123), LayoutTestRes ults({
75 'tests': {
76 'x': {
77 'passing-test.html': {
78 'expected': 'FAIL TIMEOUT',
79 'actual': 'PASS',
80 'is_unexpected': True,
81 },
82 },
83 },
84 }))
85 updater = WPTExpectationsUpdater(host)
86 self.assertEqual(updater.get_failing_results_dict(Build('MOCK Try Mac10. 10', 123)), {})
87
72 def test_get_failing_results_dict_no_results(self): 88 def test_get_failing_results_dict_no_results(self):
73 host = self.mock_host() 89 host = self.mock_host()
74 host.buildbot = MockBuildBot() 90 host.buildbot = MockBuildBot()
75 host.buildbot.set_results(Build('MOCK Try Mac10.10', 123), None) 91 host.buildbot.set_results(Build('MOCK Try Mac10.10', 123), None)
76 updater = WPTExpectationsUpdater(host) 92 updater = WPTExpectationsUpdater(host)
77 self.assertEqual(updater.get_failing_results_dict(Build('MOCK Try Mac10. 10', 123)), {}) 93 self.assertEqual(updater.get_failing_results_dict(Build('MOCK Try Mac10. 10', 123)), {})
78 94
79 def test_get_failing_results_dict_some_failing_results(self): 95 def test_get_failing_results_dict_some_failing_results(self):
80 host = self.mock_host() 96 host = self.mock_host()
81 host.buildbot.set_results(Build('MOCK Try Mac10.10', 123), LayoutTestRes ults({ 97 host.buildbot.set_results(Build('MOCK Try Mac10.10', 123), LayoutTestRes ults({
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 updater = WPTExpectationsUpdater(self.mock_host()) 459 updater = WPTExpectationsUpdater(self.mock_host())
444 updater.get_issue_number = lambda: 'None' 460 updater.get_issue_number = lambda: 'None'
445 self.assertEqual(1, updater.run(args=[])) 461 self.assertEqual(1, updater.run(args=[]))
446 self.assertLog(['ERROR: No issue on current branch.\n']) 462 self.assertLog(['ERROR: No issue on current branch.\n'])
447 463
448 def test_run_no_try_results(self): 464 def test_run_no_try_results(self):
449 updater = WPTExpectationsUpdater(self.mock_host()) 465 updater = WPTExpectationsUpdater(self.mock_host())
450 updater.get_latest_try_jobs = lambda: [] 466 updater.get_latest_try_jobs = lambda: []
451 self.assertEqual(1, updater.run(args=[])) 467 self.assertEqual(1, updater.run(args=[]))
452 self.assertLog(['ERROR: No try job information was collected.\n']) 468 self.assertLog(['ERROR: No try job information was collected.\n'])
OLDNEW
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_expectations_updater.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698