diff --git a/src/test/__init__.py b/src/test/__init__.py deleted file mode 100644 index 13a4800fbd2bdab0b9b8db587c559823f5bf9a86..0000000000000000000000000000000000000000 --- a/src/test/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -# ********************************************************************************** -# Copyright (c) KylinSoft Co., Ltd. 2024.All rights reserved. -# [kyclassifier] licensed under the Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# You may obtain a copy of Mulan PSL v2 at: -# http://license.coscl.org.cn/MulanPSL2 -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR -# PURPOSE. -# See the Mulan PSL v2 for more details. -# ********************************************************************************** -""" - -import sys -import os - -current_path = os.path.dirname(__file__) -parent_path = os.path.dirname(current_path) -pparent_path = os.path.dirname(parent_path) -sys.path.append(pparent_path) - -import unittest - -from test_repocheck import TestRepoCheck - - -if __name__ == "__main__": - unittest.main(verbosity=2) diff --git a/src/test/test_repocheck.py b/src/test/test_repocheck.py deleted file mode 100644 index c2560f71d1a198499757f488e9c6eda0f230b2a4..0000000000000000000000000000000000000000 --- a/src/test/test_repocheck.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -# ********************************************************************************** -# Copyright (c) KylinSoft Co., Ltd. 2024.All rights reserved. -# [kyclassifier] licensed under the Mulan PSL v2. -# You can use this software according to the terms and conditions of the Mulan PSL v2. -# You may obtain a copy of Mulan PSL v2 at: -# http://license.coscl.org.cn/MulanPSL2 -# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR -# PURPOSE. -# See the Mulan PSL v2 for more details. -# ********************************************************************************** -""" - -import unittest - -from src.utils.repocheck import RepoCheck - - -class TestRepoCheck(unittest.TestCase): - - def setUp(self): - self.repo_check = RepoCheck() - - def tearDown(self): - pass - - - def test_check_exist(self): - """Test class method check_exist() - """ - result = self.repo_check.check_exist() - self.assertIn(result, [True, False], "check_exist test failed!") - - def test__load_data(self): - """Test class method _load_data() - """ - result = self.repo_check._load_data() - self.assertIsInstance(result, list, "_load_data test failed!") - - -if __name__ == "__main__": - unittest.main(verbosity=2) diff --git a/test/test_repocheck.py b/test/test_repocheck.py index f3dd5f47d0e3de65bbb94bc6f6203a90cca4cb3f..44fd30fc20041d97204cf907cd10cd5abc3e6c77 100644 --- a/test/test_repocheck.py +++ b/test/test_repocheck.py @@ -36,7 +36,7 @@ class TestRepoCheck(unittest.TestCase): os.remove(self.repofile) if os.path.exists(self.dst_repofile): - os.remove(self.repofile) + os.remove(self.dst_repofile) def test_check_exist(self): """Test class method check_exist()