(self)
| 527 | self.__build('master')) |
| 528 | |
| 529 | def test_conflicts_switch(self): |
| 530 | gl.switch('other') |
| 531 | utils.write_file(self.OTHER_FILE, contents='uncommitted') |
| 532 | gl.switch('master') |
| 533 | try: |
| 534 | gl.fuse(self.OTHER, e=self.commits[self.OTHER][0]) |
| 535 | self.fail() |
| 536 | except ErrorReturnCode: |
| 537 | pass |
| 538 | |
| 539 | # Switch |
| 540 | gl.switch('other') |
| 541 | self.__assert_history(self.__build('other')) |
| 542 | st_out = utils.stdout(gl.status()) |
| 543 | self.assertTrue('fuse' not in st_out) |
| 544 | self.assertTrue('conflict' not in st_out) |
| 545 | |
| 546 | gl.switch('master') |
| 547 | st_out = utils.stdout(gl.status()) |
| 548 | self.assertTrue('fuse' in st_out) |
| 549 | self.assertTrue('conflict' in st_out) |
| 550 | |
| 551 | # Check that we are able to complete the fuse after switch |
| 552 | gl.resolve(self.OTHER_FILE) |
| 553 | gl.commit(m='ci 1 in other') |
| 554 | self.__assert_history( |
| 555 | self.__build(self.OTHER, range(1, self.COMMITS_NUMBER)) + |
| 556 | self.__build('master')) |
| 557 | |
| 558 | gl.switch('other') |
| 559 | self.assertEqual('uncommitted', utils.read_file(self.OTHER_FILE)) |
| 560 | |
| 561 | def test_conflicts_multiple(self): |
| 562 | gl.branch(c='tmp', divergent_point='HEAD~2') |
nothing calls this directly
no test coverage detected