MCPcopy Create free account
hub / github.com/gitless-vcs/gitless / TestRemote

Class TestRemote

gitless/tests/test_core.py:874–895  ·  view source on GitHub ↗

Base class for remote tests.

Source from the content-addressed store, hash-verified

872# Unit tests for remote related operations
873
874class TestRemote(TestCore):
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."""
894 super(TestRemote, self).tearDown()
895 utils_lib.rmtree(self.remote_path)
896
897
898class TestRemoteCreate(TestRemote):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected