FreeCAD

Форк
0
/
TestAddonManagerApp.py 
100 строк · 4.2 Кб
1
# SPDX-License-Identifier: LGPL-2.1-or-later
2
# ***************************************************************************
3
# *                                                                         *
4
# *   Copyright (c) 2022-2023 FreeCAD Project Association                   *
5
# *                                                                         *
6
# *   This file is part of FreeCAD.                                         *
7
# *                                                                         *
8
# *   FreeCAD is free software: you can redistribute it and/or modify it    *
9
# *   under the terms of the GNU Lesser General Public License as           *
10
# *   published by the Free Software Foundation, either version 2.1 of the  *
11
# *   License, or (at your option) any later version.                       *
12
# *                                                                         *
13
# *   FreeCAD is distributed in the hope that it will be useful, but        *
14
# *   WITHOUT ANY WARRANTY; without even the implied warranty of            *
15
# *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      *
16
# *   Lesser General Public License for more details.                       *
17
# *                                                                         *
18
# *   You should have received a copy of the GNU Lesser General Public      *
19
# *   License along with FreeCAD. If not, see                               *
20
# *   <https://www.gnu.org/licenses/>.                                      *
21
# *                                                                         *
22
# ***************************************************************************
23

24
import addonmanager_freecad_interface as fci
25

26
# Unit tests for the Addon Manager module
27
from AddonManagerTest.app.test_utilities import (
28
    TestUtilities as AddonManagerTestUtilities,
29
)
30
from AddonManagerTest.app.test_addon import (
31
    TestAddon as AddonManagerTestAddon,
32
)
33
from AddonManagerTest.app.test_cache import (
34
    TestCache as AddonManagerTestCache,
35
)
36
from AddonManagerTest.app.test_macro import (
37
    TestMacro as AddonManagerTestMacro,
38
)
39
from AddonManagerTest.app.test_git import (
40
    TestGit as AddonManagerTestGit,
41
)
42
from AddonManagerTest.app.test_installer import (
43
    TestAddonInstaller as AddonManagerTestAddonInstaller,
44
    TestMacroInstaller as AddonManagerTestMacroInstaller,
45
)
46
from AddonManagerTest.app.test_dependency_installer import (
47
    TestDependencyInstaller as AddonManagerTestDependencyInstaller,
48
)
49
from AddonManagerTest.app.test_uninstaller import (
50
    TestAddonUninstaller as AddonManagerTestAddonUninstaller,
51
    TestMacroUninstaller as AddonManagerTestMacroUninstaller,
52
)
53
from AddonManagerTest.app.test_freecad_interface import (
54
    TestConsole as AddonManagerTestConsole,
55
    TestParameters as AddonManagerTestParameters,
56
    TestDataPaths as AddonManagerTestDataPaths,
57
)
58
from AddonManagerTest.app.test_metadata import (
59
    TestDependencyType as AddonManagerTestDependencyType,
60
    TestMetadataReader as AddonManagerTestMetadataReader,
61
    TestMetadataReaderIntegration as AddonManagerTestMetadataReaderIntegration,
62
    TestUrlType as AddonManagerTestUrlType,
63
    TestVersion as AddonManagerTestVersion,
64
    TestMetadataAuxiliaryFunctions as AddonManagerTestMetadataAuxiliaryFunctions,
65
)
66

67

68
class TestListTerminator:
69
    pass
70

71

72
# Basic usage mostly to get static analyzers to stop complaining about unused imports
73
try:
74
    import FreeCAD
75
except ImportError:
76
    FreeCAD = None
77
loaded_gui_tests = [
78
    AddonManagerTestUtilities,
79
    AddonManagerTestAddon,
80
    AddonManagerTestCache,
81
    AddonManagerTestMacro,
82
    AddonManagerTestGit,
83
    AddonManagerTestAddonInstaller,
84
    AddonManagerTestMacroInstaller,
85
    AddonManagerTestDependencyInstaller,
86
    AddonManagerTestAddonUninstaller,
87
    AddonManagerTestMacroUninstaller,
88
    AddonManagerTestConsole,
89
    AddonManagerTestParameters,
90
    AddonManagerTestDataPaths,
91
    AddonManagerTestDependencyType,
92
    AddonManagerTestMetadataReader,
93
    AddonManagerTestMetadataReaderIntegration,
94
    AddonManagerTestUrlType,
95
    AddonManagerTestVersion,
96
    AddonManagerTestMetadataAuxiliaryFunctions,
97
    TestListTerminator,  # Needed to prevent the last test from running twice
98
]
99
for test in loaded_gui_tests:
100
    fci.Console.PrintLog(f"Loaded tests from {test.__name__}\n")
101

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.