Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2015-09-25 23:33:58 +0300
committerJulian Eisel <eiseljulian@gmail.com>2015-09-25 23:33:58 +0300
commit7c1f329f286f464c77f970204a3b617ce6e56086 (patch)
treec3d991a51e699ad764fcafd6773f239c494370ff /tests
parent77d809cd6b6f306c7c355ee3cf27aa20d4816b9b (diff)
parent02b789642310f55845ef4e7facc7c2659815bb25 (diff)
Merge branch 'master' into wiggly-widgets
Conflicts: source/blender/blenkernel/intern/customdata.c source/blender/blenloader/intern/versioning_270.c source/blender/windowmanager/intern/wm_init_exit.c
Diffstat (limited to 'tests')
-rw-r--r--tests/python/CMakeLists.txt10
-rw-r--r--tests/python/bl_load_py_modules.py11
-rw-r--r--tests/python/bl_mesh_modifiers.py3
-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