Creates temporary local Git repo to use as the remote.
(self)
| 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.""" |
nothing calls this directly
no test coverage detected