Changeset 54 for mergebot/trunk
- Timestamp:
- Feb 23, 2010 7:45:25 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mergebot/trunk/utils/test.py
r52 r54 17 17 from trac.tests.functional import FunctionalTestSuite, FunctionalTester, FunctionalTwillTestCaseSetup, tc, b, logfile 18 18 from trac.tests.functional.svntestenv import SvnFunctionalTestEnvironment 19 from trac.tests.contentgen import random_page #, random_sentence, random_word19 from trac.tests.contentgen import random_page, random_sentence #, random_word 20 20 21 21 … … 227 227 if files is None: 228 228 files = ['.'] 229 retval = call(['svn', 'commit', '-m', message] + list(files), 229 commit_message = self.__class__.__name__ + ": " + message 230 retval = call(['svn', 'commit', '-m', commit_message] + list(files), 230 231 cwd=self.get_workdir(), 231 232 stdout=logfile, stderr=logfile) … … 322 323 self.add_new_file(basename + '-trunk') 323 324 self.commit('Add a new file on trunk') 325 326 self._tester.rebranch(ticket_id, 'stuff') 327 328 329 class MergeBotTestRebranchWithConflict(FunctionalSvnTestCaseSetup): 330 def runTest(self): 331 """Verify that the 'rebranch' button works with conflicts on the branch and trunk""" 332 ticket_id = self._tester.create_ticket(summary=self.__class__.__name__, 333 info={'component':'stuff', 'version':'trunk'}) 334 basename = self.__class__.__name__ 335 336 # create a file in which to have conflicts 337 self.checkout() 338 self.add_new_file(basename) 339 self.commit('Add a new file on trunk') 340 341 # create the branch 342 self._tester.branch(ticket_id, 'stuff') 343 344 # modify the file on trunk 345 open(os.path.join(self.get_workdir(), basename), 'a').write(random_sentence()) 346 self.commit('Modify the file on trunk') 347 348 # modify the file on the branch 349 self.switch(ticket_id) 350 open(os.path.join(self.get_workdir(), basename), 'a').write(random_sentence()) 351 self.commit('Modify the file on branch') 324 352 325 353 self._tester.rebranch(ticket_id, 'stuff') … … 366 394 suite.addTest(MergeBotTestRebranchWithChange()) 367 395 suite.addTest(MergeBotTestRebranchWithChangeAndTrunkChange()) 396 suite.addTest(MergeBotTestRebranchWithConflict()) 368 397 suite.addTest(MergeBotTestSingleUseCase()) 369 398 return suite
Note: See TracChangeset
for help on using the changeset viewer.