From 0cf842a989d430ad88d3d15e4fe63e77470f14e6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 23 Sep 2015 03:34:37 +1000 Subject: Update module test to pass w/o freestyle enabled --- tests/python/bl_load_py_modules.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 -- cgit v1.2.3