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

Method setUp

tests/cli/test_modelcard_cmd.py:19–30  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

17class ModelUploadCMDTest(unittest.TestCase):
18
19 def setUp(self):
20 print(('Testing %s.%s' % (type(self).__name__, self._testMethodName)))
21 self.tmp_dir = tempfile.TemporaryDirectory().name
22 if not os.path.exists(self.tmp_dir):
23 os.makedirs(self.tmp_dir)
24 print(self.tmp_dir)
25 self.api = HubApi()
26 self.api.login(TEST_ACCESS_TOKEN1)
27 self.task_name = 'task-%s' % (uuid.uuid4().hex)
28 self.model_name = 'op-%s' % (uuid.uuid4().hex)
29 self.model_id = '%s/%s' % (TEST_MODEL_ORG, self.model_name)
30 print(self.tmp_dir, self.task_name, self.model_name)
31
32 def tearDown(self):
33 try:

Callers

nothing calls this directly

Calls 3

HubApiClass · 0.90
printFunction · 0.85
existsMethod · 0.45

Tested by

no test coverage detected