Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the test script for obj importing in 4.0+ and expanded gitignore #587

Merged
merged 1 commit into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ venv/
*.sublime-*
MCprep_addon/import_bridge/conf
MCprep_addon/import_bridge/nbt
MCprep_addon/MCprep_resources/
8 changes: 7 additions & 1 deletion test_files/world_tools_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down