From cbea03a501ac8492ab8ad7c8d4ea9d0c1bd04595 Mon Sep 17 00:00:00 2001 From: "wenmeng.zwm" Date: Wed, 22 Feb 2023 14:21:06 +0800 Subject: [PATCH] fix: fail to run ut in local because TEST_TOKEN required to set --- modelscope/utils/test_utils.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modelscope/utils/test_utils.py b/modelscope/utils/test_utils.py index 9c3e1e8b..26f3f9a2 100644 --- a/modelscope/utils/test_utils.py +++ b/modelscope/utils/test_utils.py @@ -22,6 +22,18 @@ from modelscope.utils.import_utils import is_tf_available, is_torch_available TEST_LEVEL = 2 TEST_LEVEL_STR = 'TEST_LEVEL' +# for user citest and sdkdev +TEST_ACCESS_TOKEN1 = os.environ.get('TEST_ACCESS_TOKEN_CITEST', None) +TEST_ACCESS_TOKEN2 = os.environ.get('TEST_ACCESS_TOKEN_SDKDEV', None) + +TEST_MODEL_CHINESE_NAME = '内部测试模型' +TEST_MODEL_ORG = 'citest' + + +def delete_credential(): + path_credential = expanduser(DEFAULT_CREDENTIALS_PATH) + shutil.rmtree(path_credential, ignore_errors=True) + def test_level(): global TEST_LEVEL