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

Method test_create

gitless/tests/test_core.py:788–795  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

786 self._assert_value_error('branch1', 'exists')
787
788 def test_create(self):
789 self.repo.create_branch('branch1', self.repo.current_branch.head)
790 self.repo.switch_current_branch(self.repo.lookup_branch('branch1'))
791 self.assertTrue(os.path.exists(TRACKED_FP))
792 self.assertEqual(TRACKED_FP_CONTENTS_2, utils_lib.read_file(TRACKED_FP))
793 self.assertFalse(os.path.exists(UNTRACKED_FP))
794 self.assertFalse(os.path.exists(IGNORED_FP))
795 self.assertFalse(os.path.exists('.gitignore'))
796
797 def test_create_from_prev_commit(self):
798 self.repo.create_branch('branch1', self.repo.revparse_single('HEAD^'))

Callers

nothing calls this directly

Calls 3

switch_current_branchMethod · 0.80
create_branchMethod · 0.45
lookup_branchMethod · 0.45

Tested by

no test coverage detected