feat: 初始化Easy Patch插件及依赖文件
- 添加Blender插件核心文件:__init__.py、ui.py、property.py、preference.py - 添加插件工具模块:g.py、loop.py、generate_loop.py、const.py、op.py - 添加翻译工具:utils/trans.py - 添加PuLP线性规划库及其依赖文件,包括CBC求解器二进制文件 - 添加.gitignore和VSCode配置文件
This commit is contained in:
33
utils/pulp/tests/run_tests.py
Normal file
33
utils/pulp/tests/run_tests.py
Normal file
@@ -0,0 +1,33 @@
|
||||
import unittest
|
||||
import pulp
|
||||
from pulp.tests import test_pulp, test_examples, test_gurobipy_env
|
||||
|
||||
|
||||
def pulpTestAll(test_docs=False):
|
||||
runner = unittest.TextTestRunner()
|
||||
suite_all = get_test_suite(test_docs)
|
||||
# we run all tests at the same time
|
||||
ret = runner.run(suite_all)
|
||||
if not ret.wasSuccessful():
|
||||
raise pulp.PulpError("Tests Failed")
|
||||
|
||||
|
||||
def get_test_suite(test_docs=False):
|
||||
# Tests
|
||||
loader = unittest.TestLoader()
|
||||
suite_all = unittest.TestSuite()
|
||||
# we get suite with all PuLP tests
|
||||
pulp_solver_tests = loader.loadTestsFromModule(test_pulp)
|
||||
suite_all.addTests(pulp_solver_tests)
|
||||
# Add tests for gurobipy env
|
||||
gurobipy_env = loader.loadTestsFromModule(test_gurobipy_env)
|
||||
suite_all.addTests(gurobipy_env)
|
||||
# We add examples and docs tests
|
||||
if test_docs:
|
||||
docs_examples = loader.loadTestsFromTestCase(test_examples.Examples_DocsTests)
|
||||
suite_all.addTests(docs_examples)
|
||||
return suite_all
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
pulpTestAll(test_docs=False)
|
||||
Reference in New Issue
Block a user