MCPcopy Create free account
hub / github.com/modelscope/modelscope / tearDown

Method tearDown

tests/hub/test_create_repo.py:24–32  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

22 self.repo_id_dataset: str = f'{TEST_ORG}/test_create_repo_dataset_{uuid.uuid4().hex[-6:]}'
23
24 def tearDown(self):
25 try:
26 self.api.delete_repo(
27 repo_id=self.repo_id_model, repo_type=REPO_TYPE_MODEL)
28 self.api.delete_repo(
29 repo_id=self.repo_id_dataset, repo_type=REPO_TYPE_DATASET)
30 except Exception as e:
31 logger.warning(f'Failed to delete repo during tearDown: {e} !')
32 delete_credential()
33
34 @unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
35 def test_create_repo(self):

Callers

nothing calls this directly

Calls 1

delete_credentialFunction · 0.90

Tested by

no test coverage detected