Skip to content

Commit

Permalink
Merge pull request #587 from Moo-Ack-Productions/fix-obj-enabling-test
Browse files Browse the repository at this point in the history
Updated the test script for obj importing in 4.0+ and expanded gitignore
  • Loading branch information
StandingPadAnimations authored Jun 9, 2024
2 parents 272df32 + f6ea598 commit 16c171d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
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

0 comments on commit 16c171d

Please sign in to comment.