Coverage for /opt/cloud/slavespace/usr1/096471637100f3de0fcfc01072822a80/dttest/build_st/python_tests/v1/st/test_v1_configs.py: 100%
23 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-07-27 10:03 +0800
« prev ^ index » next coverage.py v7.15.2, created at 2026-07-27 10:03 +0800
1#!/usr/bin/env python3
2# -*- coding: utf-8 -*-
3# -----------------------------------------------------------------------------------------------------------
4# Copyright (c) 2025 Huawei Technologies Co., Ltd.
5# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
6# CANN Open Software License Agreement Version 2.0 (the "License").
7# Please refer to the License for details. You may not use this file except in compliance with the License.
8# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
9# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10# See LICENSE in the root of the software repository for the full text of the License.
11# -----------------------------------------------------------------------------------------------------------
13import unittest
15from llm_datadist_v1.configs import LlmConfig
18class LlmConfigSt(unittest.TestCase):
19 def setUp(self):
20 print("Begin ", self._testMethodName)
21 self._llm_config = LlmConfig()
23 def tearDown(self):
24 print("End ", self._testMethodName)
26 def testEnableSwitchRole(self):
27 self._llm_config.enable_switch_role = True
28 self.assertEqual(self._llm_config.enable_switch_role, True)
30 def testEnableCacheManager(self):
31 self._llm_config.enable_cache_manager = True
32 self.assertEqual(self._llm_config.enable_cache_manager, True)
34 def testEnableRemoteCacheAccessible(self):
35 self._llm_config.enable_remote_cache_accessible = True
36 self.assertEqual(self._llm_config.enable_remote_cache_accessible, True)
38 def testMemPoolCfg(self):
39 self._llm_config.mem_pool_cfg = "mem_pool_cfg"
40 self.assertEqual(self._llm_config.mem_pool_cfg, "mem_pool_cfg")
42 def testHostMemPoolCfg(self):
43 self._llm_config.host_mem_pool_cfg = "host_mem_pool_cfg"
44 self.assertEqual(self._llm_config.host_mem_pool_cfg, "host_mem_pool_cfg")