Added unit test for import PSKs with invalid faces

This commit is contained in:
Colin Basnett
2025-08-03 01:50:31 -07:00
parent 3e54378a57
commit ef38b896a6
2 changed files with 11 additions and 1 deletions

BIN
tests/data/Bat.psk LFS Normal file

Binary file not shown.

View File

@@ -4,6 +4,7 @@ import pytest
SUZANNE_FILEPATH = 'tests/data/Suzanne.psk'
SARGE_FILEPATH = 'tests/data/CS_Sarge_S0_Skelmesh.pskx'
SLURP_MONSTER_AXE_FILEPATH = 'tests/data/Slurp_Monster_Axe_LOD0.psk'
BAT_FILEPATH = 'tests/data/Bat.psk'
@pytest.fixture(autouse=True)
@@ -280,3 +281,9 @@ def test_psk_import_without_shape_keys():
assert mesh_object.type == 'MESH', "Mesh object type should be MESH"
assert mesh_object.data.shape_keys is None, "Mesh object should not have shape keys"
def test_psk_import_with_invalid_faces():
assert bpy.ops.psk.import_file(
filepath=BAT_FILEPATH,
components='MESH'
) == {'FINISHED'}