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

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

Issue 2518313003: Refactor WPT Export to ensure only one PR in flight at a time (Closed)
Patch Set: Address CL feedback 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
(Empty)
1 class MockWPTGitHub(object):
2
3 def __init__(self, pull_requests, unsuccessful_merge=False):
4 self.pull_requests = pull_requests
5 self.unsuccessful_merge = unsuccessful_merge
6 self.calls = []
7 self.pull_requests_created = []
8
9 def in_flight_pull_requests(self):
10 self.calls.append('in_flight_pull_requests')
11 return self.pull_requests
12
13 def merge_pull_request(self, number):
14 self.calls.append('merge_pull_request')
15 if self.unsuccessful_merge:
16 raise Exception('PR could not be merged: %d' % number)
17
18 def create_pr(self, local_branch_name, desc_title, body):
19 self.calls.append('create_pr')
20
21 assert local_branch_name
22 assert desc_title
23 assert body
24
25 self.pull_requests_created.append((local_branch_name, desc_title, body))
26
27 return {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698