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

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

Issue 2544173002: Skip commits that don't generate a patch + fixes to get export working (Closed)
Patch Set: Merge ChromiumWPT functionality into TestExporter, expose exportable_commits Created 4 years 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
OLDNEW
1 class MockWPTGitHub(object): 1 class MockWPTGitHub(object):
2 2
3 def __init__(self, pull_requests, unsuccessful_merge=False): 3 def __init__(self, pull_requests, unsuccessful_merge=False):
4 self.pull_requests = pull_requests 4 self.pull_requests = pull_requests
5 self.unsuccessful_merge = unsuccessful_merge 5 self.unsuccessful_merge = unsuccessful_merge
6 self.calls = [] 6 self.calls = []
7 self.pull_requests_created = [] 7 self.pull_requests_created = []
8 8
9 def in_flight_pull_requests(self): 9 def in_flight_pull_requests(self):
10 self.calls.append('in_flight_pull_requests') 10 self.calls.append('in_flight_pull_requests')
11 return self.pull_requests 11 return self.pull_requests
12 12
13 def merge_pull_request(self, number): 13 def merge_pull_request(self, number):
14 self.calls.append('merge_pull_request') 14 self.calls.append('merge_pull_request')
15 if self.unsuccessful_merge: 15 if self.unsuccessful_merge:
16 raise Exception('PR could not be merged: %d' % number) 16 raise Exception('PR could not be merged: %d' % number)
17 17
18 def create_pr(self, local_branch_name, desc_title, body): 18 def create_pr(self, remote_branch_name, desc_title, body):
19 self.calls.append('create_pr') 19 self.calls.append('create_pr')
20 20
21 assert local_branch_name 21 assert remote_branch_name
22 assert desc_title 22 assert desc_title
23 assert body 23 assert body
24 24
25 self.pull_requests_created.append((local_branch_name, desc_title, body)) 25 self.pull_requests_created.append((remote_branch_name, desc_title, body) )
26 26
27 return {} 27 return {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698