mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-24 12:09:22 +01:00
25 lines
626 B
Python
25 lines
626 B
Python
# Copyright (c) Alibaba, Inc. and its affiliates.
|
|
import unittest
|
|
|
|
from modelscope.hub.api import HubApi
|
|
from modelscope.utils.logger import get_logger
|
|
|
|
logger = get_logger()
|
|
DEFAULT_GIT_PATH = 'git'
|
|
download_model_file_name = 'test.bin'
|
|
|
|
|
|
class FileExistsTest(unittest.TestCase):
|
|
|
|
def test_file_exists(self):
|
|
api = HubApi()
|
|
self.assertTrue(
|
|
api.file_exists('iic/gte_Qwen2-7B-instruct', 'added_tokens.json'))
|
|
self.assertTrue(
|
|
api.file_exists('iic/gte_Qwen2-7B-instruct',
|
|
'1_Pooling/config.json'))
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|