[Bf-blender-cvs] [0cf842a] master: Update module test to pass w/o freestyle enabled

Campbell Barton noreply at git.blender.org
Tue Sep 22 19:45:18 CEST 2015


Commit: 0cf842a989d430ad88d3d15e4fe63e77470f14e6
Author: Campbell Barton
Date:   Wed Sep 23 03:34:37 2015 +1000
Branches: master
https://developer.blender.org/rB0cf842a989d430ad88d3d15e4fe63e77470f14e6

Update module test to pass w/o freestyle enabled

===================================================================

M	tests/python/bl_load_py_modules.py

===================================================================

diff --git a/tests/python/bl_load_py_modules.py b/tests/python/bl_load_py_modules.py
index 5cd2105..4256cba 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




More information about the Bf-blender-cvs mailing list