MCPcopy
hub / github.com/gitless-vcs/gitless / test_conflicts_switch

Method test_conflicts_switch

gitless/tests/test_e2e.py:529–559  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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')

Callers

nothing calls this directly

Calls 4

__assert_historyMethod · 0.95
__buildMethod · 0.95
fuseMethod · 0.80
statusMethod · 0.80

Tested by

no test coverage detected