From f6ea598a023584081e0d1be4854c96aa6bb91ab5 Mon Sep 17 00:00:00 2001 From: "Patrick W. Crawford" Date: Sat, 8 Jun 2024 17:26:13 -0700 Subject: [PATCH] Updated the test script for obj importing in 4.0+ and expanded gitignore tbh I'm a bit confused how tests were passing on github actions since the obj enabling test *should* have been failing. Let's see what happens now. --- .gitignore | 1 + test_files/world_tools_test.py | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7609229d..5b2e707f 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ venv/ *.sublime-* MCprep_addon/import_bridge/conf MCprep_addon/import_bridge/nbt +MCprep_addon/MCprep_resources/ \ No newline at end of file diff --git a/test_files/world_tools_test.py b/test_files/world_tools_test.py index ef71b316..ff56cadc 100644 --- a/test_files/world_tools_test.py +++ b/test_files/world_tools_test.py @@ -161,7 +161,13 @@ def _import_materials_util(self, mapping_set): def test_enable_obj_importer(self): """Ensure module name is correct, since error won't be reported.""" - bpy.ops.preferences.addon_enable(module="io_scene_obj") + if bpy.app.version < (4, 0): + res = bpy.ops.preferences.addon_enable(module="io_scene_obj") + self.assertEqual(res, {'FINISHED'}) + else: + in_import_scn = "obj_import" in dir(bpy.ops.wm) + self.assertTrue(in_import_scn, "obj_import operator not found") + def test_world_import_jmc_full(self): test_subpath = os.path.join(