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

Method tearDown

tests/hub/test_create_aigc_model.py:31–39  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

29 self.tmp_file_path = self.tmp_file.name
30
31 def tearDown(self):
32 # Login before cleaning up, ensuring token is valid for deletion.
33 try:
34 self.api.login(TEST_ACCESS_TOKEN1)
35 self.api.delete_model(model_id=self.repo_id)
36 except Exception as e:
37 logger.warning(f'Error deleting model {self.repo_id}: {e}')
38 os.remove(self.tmp_file_path)
39 delete_credential()
40
41 @unittest.skipUnless(test_level() >= 2, 'skip test in current test level')
42 def test_create_aigc_model_expects_sha256_error(self):

Callers

nothing calls this directly

Calls 2

delete_credentialFunction · 0.90
removeMethod · 0.45

Tested by

no test coverage detected