From 843c745aae618a55871013a64870a4ce1c5e3ff8 Mon Sep 17 00:00:00 2001 From: Manuel Martin Date: Tue, 5 Dec 2023 15:16:07 +0100 Subject: [PATCH] Fix tests Tests fix attempt Tests wip wip Restore tests paths Remove default instance wip --- addons/io_hubs_addon/icons.py | 2 +- addons/io_hubs_addon/preferences.py | 7 ------- tests/test/test_export.js | 7 +++---- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/addons/io_hubs_addon/icons.py b/addons/io_hubs_addon/icons.py index 91af96d4..b1921672 100644 --- a/addons/io_hubs_addon/icons.py +++ b/addons/io_hubs_addon/icons.py @@ -19,7 +19,7 @@ def load_icons(): def unload_icons(): global __hubs_icons - __hubs_icons["hubs"].close() + bpy.utils.previews.remove(__hubs_icons["hubs"]) del __hubs_icons diff --git a/addons/io_hubs_addon/preferences.py b/addons/io_hubs_addon/preferences.py index 1af5a776..4c4b14c9 100644 --- a/addons/io_hubs_addon/preferences.py +++ b/addons/io_hubs_addon/preferences.py @@ -312,13 +312,6 @@ def register(): bpy.utils.register_class(UninstallDepsOperator) bpy.utils.register_class(DeleteProfileOperator) - prefs = get_addon_pref(bpy.context) - if len(prefs.hubs_instances) == 0: - new_instance = prefs.hubs_instances.add() - new_instance.name = "Demo Hub" - new_instance.url = "https://hubs.mozilla.com/demo" - prefs.hubs_instance_idx = len(prefs.hubs_instances) - 1 - def unregister(): bpy.utils.unregister_class(DeleteProfileOperator) diff --git a/tests/test/test_export.js b/tests/test/test_export.js index 83a8b916..02dc9301 100644 --- a/tests/test/test_export.js +++ b/tests/test/test_export.js @@ -35,10 +35,10 @@ describe('Exporter', function () { describe(blenderVersion + '_export' + variant[0], function () { blenderSampleScenes.forEach((scene) => { it(scene, function (done) { - let outDirName = 'out' + blenderVersion + variant[0]; let blenderPath = `scenes/${scene}.blend`; let ext = args.indexOf('--glb') === -1 ? '.gltf' : '.glb'; - let outDirPath = path.resolve(OUT_PREFIX, 'scenes', outDirName); + let outDirPath = path.resolve(OUT_PREFIX, 'scenes'); + fs.mkdirSync(outDirPath, { recursive: true }); let dstPath = path.resolve(outDirPath, `${scene}${ext}`); utils.blenderFileToGltf(blenderVersion, blenderPath, outDirPath, (error) => { if (error) @@ -52,8 +52,7 @@ describe('Exporter', function () { }); describe(blenderVersion + '_export_results', function () { - let outDirName = 'out' + blenderVersion; - let outDirPath = path.resolve(OUT_PREFIX, 'scenes', outDirName); + let outDirPath = path.resolve(OUT_PREFIX, 'scenes'); it('can export link', function () { let gltfPath = path.resolve(outDirPath, 'link.gltf');