Changeset 294893 in webkit
- Timestamp:
- May 26, 2022, 1:18:36 PM (4 years ago)
- Location:
- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy
- Files:
-
- 2 edited
-
program/branch.py (modified) (1 diff)
-
test/branch_unittest.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py
r294038 r294893 119 119 if not issue and Tracker.instance(): 120 120 if ' ' in args.issue: 121 if getattr(Tracker.instance(), 'credentials' ):121 if getattr(Tracker.instance(), 'credentials', None): 122 122 Tracker.instance().credentials(required=True, validate=True) 123 123 issue = Tracker.instance().create( -
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py
r293875 r294893 126 126 127 127 def test_create_bug(self): 128 self.maxDiff = None 129 with MockTerminal.input('2'), OutputCapture(level=logging.INFO) as captured, mocks.local.Git(self.path), bmocks.Bugzilla( 128 with OutputCapture(level=logging.INFO) as captured, mocks.local.Git(self.path), bmocks.Bugzilla( 130 129 self.BUGZILLA.split('://')[-1], 131 130 issues=bmocks.ISSUES, … … 178 177 self.assertEqual(captured.stderr.getvalue(), '') 179 178 179 def test_create_radar(self): 180 with OutputCapture(level=logging.INFO) as captured, mocks.local.Git(self.path), Environment(RADAR_USERNAME='tcontributor'), bmocks.Radar( 181 issues=bmocks.ISSUES, 182 projects=bmocks.PROJECTS, 183 ), patch('webkitbugspy.Tracker._trackers', [radar.Tracker(project='WebKit')]), mocks.local.Svn(), MockTime, wkmocks.Terminal.input( 184 '[Area] New Issue', 'Issue created via command line prompts.', 185 '1', '2', 186 ): 187 self.assertEqual(0, program.main( 188 args=('branch',), 189 path=self.path, 190 )) 191 self.assertEqual(local.Git(self.path).branch, 'eng/Area-New-Issue') 192 193 issue = radar.Tracker(project='WebKit').issue(4) 194 self.assertEqual(issue.title, '[Area] New Issue') 195 self.assertEqual(issue.description, 'Issue created via command line prompts.') 196 self.assertEqual(issue.project, 'WebKit') 197 self.assertEqual(issue.component, 'SVG') 198 self.assertEqual(issue.version, 'Safari 15') 199 200 self.assertEqual( 201 captured.stdout.getvalue(), 202 '''Enter issue URL or title of new issue: 203 Issue description: 204 What component in 'WebKit' should the bug be associated with?: 205 1) SVG 206 2) Scrolling 207 3) Tables 208 4) Text 209 : 210 What version of 'WebKit SVG' should the bug be associated with?: 211 1) Other 212 2) Safari 15 213 3) Safari Technology Preview 214 4) WebKit Local Build 215 : 216 Created '<rdar://4> [Area] New Issue' 217 Created the local development branch 'eng/Area-New-Issue' 218 ''', 219 ) 220 self.assertEqual(captured.stderr.getvalue(), '') 221 180 222 def test_to_branch_name(self): 181 223 self.assertEqual(program.Branch.to_branch_name('something with spaces'), 'something-with-spaces')
Note:
See TracChangeset
for help on using the changeset viewer.