Skip to content

Commit

Permalink
added repo creation to test setups
Browse files Browse the repository at this point in the history
  • Loading branch information
merveenoyan committed Jul 21, 2022
1 parent 1bec939 commit 792af11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tests/test_repocard.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,12 @@ def setUpClass(cls):
def setUp(self) -> None:
self.repo_path = Path(tempfile.mkdtemp())
self.REPO_NAME = repo_name()
url = self._api.create_repo(
repo_id=f"{USER}/{self.REPO_NAME}", token=self._token
)
self.repo = Repository(
self.repo_path / self.REPO_NAME,
clone_from=f"{USER}/{self.REPO_NAME}",
clone_from=url,
use_auth_token=self._token,
git_user="ci",
git_email="ci@dummy.com",
Expand Down
3 changes: 2 additions & 1 deletion tests/test_snapshot_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ def setUp(self) -> None:
if os.path.exists(REPO_NAME):
shutil.rmtree(REPO_NAME, onerror=set_write_permission_and_retry)
logger.info(f"Does {REPO_NAME} exist: {os.path.exists(REPO_NAME)}")
url = self._api.create_repo(repo_id=f"{USER}/{REPO_NAME}", token=self._token)
repo = Repository(
REPO_NAME,
clone_from=f"{USER}/{REPO_NAME}",
clone_from=url,
use_auth_token=self._token,
git_user="ci",
git_email="ci@dummy.com",
Expand Down

0 comments on commit 792af11

Please sign in to comment.