diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/python/CMakeLists.txt | 10 | ||||
-rw-r--r-- | tests/python/bl_load_py_modules.py | 11 | ||||
-rw-r--r-- | tests/python/bl_mesh_modifiers.py | 3 | ||||
-rw-r--r-- | tests/python/bl_pyapi_bpy_path.py (renamed from tests/python/bl_bpy_path.py) | 2 | ||||
-rw-r--r-- | tests/python/bl_pyapi_bpy_utils_units.py (renamed from tests/python/bl_pyapi_units.py) | 2 |
5 files changed, 23 insertions, 5 deletions
diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt index 8ed9b51f736..fd2176e64d7 100644 --- a/tests/python/CMakeLists.txt +++ b/tests/python/CMakeLists.txt @@ -73,6 +73,16 @@ if(USE_EXPERIMENTAL_TESTS) ) endif() +# ------------------------------------------------------------------------------ +# PY API TESTS +add_test(script_pyapi_bpy_path ${TEST_BLENDER_EXE} + --python ${CMAKE_CURRENT_LIST_DIR}/bl_pyapi_bpy_path.py +) + +add_test(script_pyapi_bpy_utils_units ${TEST_BLENDER_EXE} + --python ${CMAKE_CURRENT_LIST_DIR}/bl_pyapi_bpy_utils_units.py +) + # test running mathutils testing script add_test(script_pyapi_mathutils ${TEST_BLENDER_EXE} --python ${CMAKE_CURRENT_LIST_DIR}/bl_pyapi_mathutils.py diff --git a/tests/python/bl_load_py_modules.py b/tests/python/bl_load_py_modules.py index 5cd21058c99..4256cba0933 100644 --- a/tests/python/bl_load_py_modules.py +++ b/tests/python/bl_load_py_modules.py @@ -38,6 +38,9 @@ BLACKLIST = { 'io_import_dxf', # Because of cydxfentity.so dependency } +if not bpy.app.build_options.freestyle: + BLACKLIST.add("render_freestyle_svg") + BLACKLIST_DIRS = ( os.path.join(bpy.utils.resource_path('USER'), "scripts"), ) + tuple(addon_utils.paths()[1:]) @@ -75,8 +78,11 @@ def load_addons(): for mod in modules: mod_name = mod.__name__ + if mod_name in BLACKLIST: + continue addon_utils.enable(mod_name, default_set=True) - assert(mod_name in addons) + if not (mod_name in addons): + raise Exception("'addon_utils.enable(%r)' call failed" % mod_name) def load_modules(): @@ -157,7 +163,8 @@ def load_modules(): ignore_paths = [ os.sep + "presets" + os.sep, os.sep + "templates" + os.sep, - ] + [(os.sep + f + os.sep) for f in BLACKLIST] + ] + ([(os.sep + f + os.sep) for f in BLACKLIST] + + [(os.sep + f + ".py") for f in BLACKLIST]) for f in source_files: ok = False diff --git a/tests/python/bl_mesh_modifiers.py b/tests/python/bl_mesh_modifiers.py index 2db38895f9b..0121be29dd6 100644 --- a/tests/python/bl_mesh_modifiers.py +++ b/tests/python/bl_mesh_modifiers.py @@ -197,8 +197,9 @@ def defaults_object(obj): obj.show_wire = True if obj.type == 'MESH': + obj.show_all_edges = True + mesh = obj.data - mesh.show_all_edges = True mesh.show_normal_vertex = True diff --git a/tests/python/bl_bpy_path.py b/tests/python/bl_pyapi_bpy_path.py index 5c4ae91a5df..2d6019fbb07 100644 --- a/tests/python/bl_bpy_path.py +++ b/tests/python/bl_pyapi_bpy_path.py @@ -1,6 +1,6 @@ # Apache License, Version 2.0 -# ./blender.bin --background -noaudio --python tests/python/bl_bpy_path.py -- --verbose +# ./blender.bin --background -noaudio --python tests/python/bl_pyapi_bpy_path.py -- --verbose import unittest diff --git a/tests/python/bl_pyapi_units.py b/tests/python/bl_pyapi_bpy_utils_units.py index 128cc100b25..f40dab4b5eb 100644 --- a/tests/python/bl_pyapi_units.py +++ b/tests/python/bl_pyapi_bpy_utils_units.py @@ -1,6 +1,6 @@ # Apache License, Version 2.0 -# ./blender.bin --background -noaudio --python tests/python/bl_pyapi_units.py -- --verbose +# ./blender.bin --background -noaudio --python tests/python/bl_pyapi_bpy_utils_units.py -- --verbose import unittest from bpy.utils import units |