def test_merge_with_conflicts(self): git = GitCmd() git.do_branch('trial') G.change_location_file("Git Crystal") git.do_stage('location.json') git.do_commit('Player in Git Crystal') git.do_checkout('data') G.change_location_file("Stalagmite Central") git.do_stage('location.json') git.do_merge('trial') git.do_resolveleft('location.json') git.do_resolveright('location.json') git.do_stage('location.json') git.do_commit('Merge Branch Trial') git.do_status( '') # Get status message after successful merge resolution. command = [G.GIT, '-C', G.repodir, 'branch', '-D', 'trial'] process = cw.run_process(command) expected = 'No changes since last commit\n' self.assertEqual(git.output, expected)
def test_status(self): git = GitCmd() git.do_status('') expected = 'No changes since last commit\n' self.assertEqual(git.output, expected) G.change_location_file("Git Crystal") git.do_status('') expected = " unstaged changes: location.json\n" self.assertEqual(git.output, expected) git.do_stage('location.json') git.do_status('') expected = " staged changes: location.json\n" self.assertEqual(git.output, expected) G.change_location_file("Stalagmite Central") git.do_status('') expected = ' staged changes: location.json\n unstaged changes: location.json\n' self.assertEqual(git.output, expected)