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

Method tearDown

tests/cli/test_create_cmd.py:31–40  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

29 self.token: str = TEST_ACCESS_TOKEN1
30
31 def tearDown(self):
32 api = HubApi()
33 api.login(self.token)
34
35 try:
36 api.delete_model(model_id=self.repo_id)
37 except Exception as e:
38 print(f'Error deleting model {self.repo_id}: {e}')
39
40 print(f'Test {type(self).__name__}.{self._testMethodName} finished')
41
42 @unittest.skipUnless(test_level() >= 1,
43 'skip test because the security hook')

Callers

nothing calls this directly

Calls 2

HubApiClass · 0.90
printFunction · 0.85

Tested by

no test coverage detected