@@ -35,9 +35,6 @@ def setUpClass(cls):
3535 cls .repo_upstream_path = cls ._get_upstream_repository_path ()
3636 cls .addon_path = Path (cls .repo_upstream_path ) / cls .addon
3737 cls .manifest_path = cls .addon_path / "__manifest__.py"
38- # By cloning the first repository this will set an 'origin' remote
39- cls .repo_path = cls ._clone_tmp_git_repository (cls .repo_upstream_path )
40- cls ._add_fork_remote (cls .repo_path )
4138
4239 @classmethod
4340 def _apply_git_config (cls ):
@@ -101,12 +98,6 @@ def _create_tmp_git_repository(cls) -> Path:
10198 git .Repo .init (repo_path )
10299 return Path (repo_path )
103100
104- @classmethod
105- def _clone_tmp_git_repository (cls , upstream_path : Path ) -> Path :
106- repo_path = tempfile .mkdtemp ()
107- git .Repo .clone_from (upstream_path , repo_path )
108- return Path (repo_path )
109-
110101 @classmethod
111102 def _fill_git_repository (cls , repo_path : Path , addon_path : Path ):
112103 """Create branches with some content in the Git repository."""
@@ -163,15 +154,8 @@ def _create_module(cls, module_path: Path):
163154 with open (manifest_path , "w" ) as manifest :
164155 manifest .writelines (manifest_lines )
165156
166- @classmethod
167- def _add_fork_remote (cls , repo_path : Path ):
168- repo = git .Repo (repo_path )
169- # We do not really care about the remote URL here, re-use origin one
170- repo .create_remote (cls .fork_org , repo .remotes .origin .url )
171-
172157 @classmethod
173158 def tearDownClass (cls ):
174159 super ().tearDownClass ()
175- # Clean up the Git repository
160+ # Clean up upstream Git repository
176161 shutil .rmtree (cls .repo_upstream_path )
177- shutil .rmtree (cls .repo_path )
0 commit comments