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

Method setUp

gitless/tests/test_core.py:877–890  ·  view source on GitHub ↗

Creates temporary local Git repo to use as the remote.

(self)

Source from the content-addressed store, hash-verified

875 """Base class for remote tests."""
876
877 def setUp(self):
878 """Creates temporary local Git repo to use as the remote."""
879 super(TestRemote, self).setUp()
880
881 # Create a repo to use as the remote
882 self.remote_path = tempfile.mkdtemp(prefix='gl-remote-test')
883 os.chdir(self.remote_path)
884 remote_repo = core.init_repository()
885 remote_repo.create_branch(
886 REMOTE_BRANCH, remote_repo.revparse_single('HEAD'))
887
888 # Go back to the original repo
889 os.chdir(self.path)
890 self.remotes = self.repo.remotes
891
892 def tearDown(self):
893 """Removes the temporary dir."""

Callers

nothing calls this directly

Calls 3

revparse_singleMethod · 0.80
setUpMethod · 0.45
create_branchMethod · 0.45

Tested by

no test coverage detected