FreeCAD
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
24import addonmanager_freecad_interface as fci25
26# Unit tests for the Addon Manager module
27from AddonManagerTest.app.test_utilities import (28TestUtilities as AddonManagerTestUtilities,29)
30from AddonManagerTest.app.test_addon import (31TestAddon as AddonManagerTestAddon,32)
33from AddonManagerTest.app.test_cache import (34TestCache as AddonManagerTestCache,35)
36from AddonManagerTest.app.test_macro import (37TestMacro as AddonManagerTestMacro,38)
39from AddonManagerTest.app.test_git import (40TestGit as AddonManagerTestGit,41)
42from AddonManagerTest.app.test_installer import (43TestAddonInstaller as AddonManagerTestAddonInstaller,44TestMacroInstaller as AddonManagerTestMacroInstaller,45)
46from AddonManagerTest.app.test_dependency_installer import (47TestDependencyInstaller as AddonManagerTestDependencyInstaller,48)
49from AddonManagerTest.app.test_uninstaller import (50TestAddonUninstaller as AddonManagerTestAddonUninstaller,51TestMacroUninstaller as AddonManagerTestMacroUninstaller,52)
53from AddonManagerTest.app.test_freecad_interface import (54TestConsole as AddonManagerTestConsole,55TestParameters as AddonManagerTestParameters,56TestDataPaths as AddonManagerTestDataPaths,57)
58from AddonManagerTest.app.test_metadata import (59TestDependencyType as AddonManagerTestDependencyType,60TestMetadataReader as AddonManagerTestMetadataReader,61TestMetadataReaderIntegration as AddonManagerTestMetadataReaderIntegration,62TestUrlType as AddonManagerTestUrlType,63TestVersion as AddonManagerTestVersion,64TestMetadataAuxiliaryFunctions as AddonManagerTestMetadataAuxiliaryFunctions,65)
66
67
68class TestListTerminator:69pass70
71
72# Basic usage mostly to get static analyzers to stop complaining about unused imports
73try:74import FreeCAD75except ImportError:76FreeCAD = None77loaded_gui_tests = [78AddonManagerTestUtilities,79AddonManagerTestAddon,80AddonManagerTestCache,81AddonManagerTestMacro,82AddonManagerTestGit,83AddonManagerTestAddonInstaller,84AddonManagerTestMacroInstaller,85AddonManagerTestDependencyInstaller,86AddonManagerTestAddonUninstaller,87AddonManagerTestMacroUninstaller,88AddonManagerTestConsole,89AddonManagerTestParameters,90AddonManagerTestDataPaths,91AddonManagerTestDependencyType,92AddonManagerTestMetadataReader,93AddonManagerTestMetadataReaderIntegration,94AddonManagerTestUrlType,95AddonManagerTestVersion,96AddonManagerTestMetadataAuxiliaryFunctions,97TestListTerminator, # Needed to prevent the last test from running twice98]
99for test in loaded_gui_tests:100fci.Console.PrintLog(f"Loaded tests from {test.__name__}\n")101