Commits

Ronny Pfannschmidt  committed 67074f7

add test for ensuring ImageTexture Order

  • Participants
  • Parent commits ddea884

Comments (0)

Files changed (1)

File test_bx3d_fix.py

 def make_broken_tree():
     app = Element('Appearance')
     mat = SubElement(app, 'Material')
-    tex = SubElement(app, 'ImageTexture')
+    tex = SubElement(app, 'ImageTexture', {'idx':0})
+    tex = SubElement(app, 'ImageTexture', {'idx':1})
     return app
 
 
     tree = make_broken_tree()
     assert is_broken_tree(tree)
     fix_tree(tree)
+    for idx, item in enumerate(tree.findall('ImageTexture')):
+        assert item.attrib['idx'] == idx
     assert not is_broken_tree(tree)