(self)
| 28 | class HubRepositoryTest(unittest.TestCase): |
| 29 | |
| 30 | def setUp(self): |
| 31 | self.old_cwd = os.getcwd() |
| 32 | self.api = HubApi() |
| 33 | self.api.login(TEST_ACCESS_TOKEN1) |
| 34 | self.model_name = 'repo-%s' % (uuid.uuid4().hex) |
| 35 | self.model_id = '%s/%s' % (TEST_MODEL_ORG, self.model_name) |
| 36 | self.revision = 'v0.1_test_revision' |
| 37 | self.api.create_model( |
| 38 | model_id=self.model_id, |
| 39 | visibility=ModelVisibility.PUBLIC, |
| 40 | license=Licenses.APACHE_V2, |
| 41 | chinese_name=TEST_MODEL_CHINESE_NAME, |
| 42 | ) |
| 43 | temporary_dir = tempfile.mkdtemp() |
| 44 | self.model_dir = os.path.join(temporary_dir, self.model_name) |
| 45 | |
| 46 | def tearDown(self): |
| 47 | os.chdir(self.old_cwd) |
nothing calls this directly
no test coverage detected