Test failures due to changes in implementation of HavokMaterial layer information
Version Information
Pyffi Version Info
2.2.3
Platform information
win32
Context
DocString tests are failing when executed
niftoaster.txt
bhkpackednitristripsshape.txt
opt_collisiongeometry.txt
opt_collision_to_box_shape.txt
Steps to Reproduce
. Update test_doctest.py to include the above doctest paths
. py.test -v /tests/test_doctests.py
Expected Result
Test should pass without failure
Actual Result
Test is failing as its attempting to assign an object type HavokMaterial as a formatted integer string
expected HavokMaterial but got int
Possible Fix
Update required due to nif.xml changes to HavokMaterial, spells needs to be updated to extract layer information.
Screenshot
N\A
Logs and Files
[Provide the generated log output and any accompanying files for the format related to the issue]
Console Output
File "\pyffi\tests\formats\nif\niftoaster.txt", line 1347, in niftoaster.txt
Failed example:
niftoaster.NifToaster().cli() # doctest: +ELLIPSIS
Exception raised:
Traceback (most recent call last):
File "C:\Python34\Lib\doctest.py", line 1318, in __run
compileflags, 1), test.globs)
File "<doctest niftoaster.txt[79]>", line 1, in <module>
niftoaster.NifToaster().cli() # doctest: +ELLIPSIS
File "\pyffi\pyffi\spells\__init__.py", line 1265, in cli
self.toast(self.top)
File "\pyffi\pyffi\spells\__init__.py", line 1381, in toast
self._toast(stream)
File "\pyffi\pyffi\spells\__init__.py", line 1464, in _toast
spell.recurse()
File "\pyffi\pyffi\spells\__init__.py", line 291, in recurse
self.recurse(child)
File "\pyffi\pyffi\spells\__init__.py", line 305, in recurse
self.recurse(child)
File "\pyffi\pyffi\spells\__init__.py", line 305, in recurse
self.recurse(child)
File "\pyffi\pyffi\spells\__init__.py", line 305, in recurse
self.recurse(child)
File "\pyffi\pyffi\spells\__init__.py", line 300, in recurse
if self.branchentry(branch):
File "\pyffi\pyffi\spells\nif\fix.py", line 539, in branchentry
branch.update_mopp()
File "\pyffi\pyffi\formats\nif\__init__.py", line 2452, in update_mopp
self.update_mopp_welding()
File "\pyffi\pyffi\formats\nif\__init__.py", line 2486, in update_mopp_welding
material_per_triangle)
File "\pyffi\pyffi\utils\mopp.py", line 168, in getMopperOriginScaleCodeWelding
infile.write("%i\n" % matindex)
TypeError: %i format: a number is required, not HavokMaterial
FAIL: .\pyffi\tests\formats\nif\bhkpackednitristripsshape.txt
Doctest: bhkpackednitristripsshape.txt
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Python34\Lib\doctest.py", line 2187, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for bhkpackednitristripsshape.txt
File ".\pyffi\tests\formats\nif\bhkpackednitristripsshape.txt", line 0
----------------------------------------------------------------------
File ".\pyffi\tests\formats\nif\bhkpackednitristripsshape.txt", line 19, in bhkpackednitristripsshape.txt
Failed example:
shape.add_shape(triangles=triangles1, normals=normals1, vertices=vertices1,
layer=1, material=2)
Exception raised:
Traceback (most recent call last):
File "C:\Python34\Lib\doctest.py", line 1318, in __run
compileflags, 1), test.globs)
File "<doctest bhkpackednitristripsshape.txt[10]>", line 2, in <module>
layer=1, material=2)
File ".\pyffi\pyffi\formats\nif\__init__.py", line 2975, in add_shape
self.sub_shapes[num_shapes].material = material
File ".\pyffi\pyffi\object_models\xml\struct_.py", line 592, in set_attribute
value.__class__.__name__))
TypeError: expected HavokMaterial but got int
----------------------------------------------------------------------
File ".\pyffi\tests\formats\nif\bhkpackednitristripsshape.txt", line 21, in bhkpackednitristripsshape.txt
Failed example:
shape.add_shape(triangles=triangles2, normals=normals2, vertices=vertices2,
layer=3, material=4)
Exception raised:
Traceback (most recent call last):
File "C:\Python34\Lib\doctest.py", line 1318, in __run
compileflags, 1), test.globs)
File "<doctest bhkpackednitristripsshape.txt[11]>", line 2, in <module>
layer=3, material=4)
File ".\pyffi\pyffi\formats\nif\__init__.py", line 2975, in add_shape
self.sub_shapes[num_shapes].material = material
File ".\pyffi\pyffi\object_models\xml\struct_.py", line 592, in set_attribute
value.__class__.__name__))
TypeError: expected HavokMaterial but got int
----------------------------------------------------------------------
File ".\pyffi\tests\formats\nif\bhkpackednitristripsshape.txt", line 29, in bhkpackednitristripsshape.txt
Failed example:
shape.sub_shapes[0].material
Expected:
2
Got:
<pyffi.formats.nif.HavokMaterial object at 0x00000000042CDC18>
----------------------------------------------------------------------
File ".\pyffi\tests\formats\nif\bhkpackednitristripsshape.txt", line 35, in bhkpackednitristripsshape.txt
Failed example:
shape.sub_shapes[1].material
Expected:
4
Got:
<pyffi.formats.nif.HavokMaterial object at 0x00000000042AEDD8>
----------------------------------------------------------------------
File ".\pyffi\tests\formats\nif\bhkpackednitristripsshape.txt", line 40, in bhkpackednitristripsshape.txt
Failed example:
shape.data.sub_shapes[0].layer
Exception raised:
Traceback (most recent call last):
File "C:\Python34\Lib\doctest.py", line 1318, in __run
compileflags, 1), test.globs)
File "<doctest bhkpackednitristripsshape.txt[20]>", line 1, in <module>
shape.data.sub_shapes[0].layer
AttributeError: 'OblivionSubShape' object has no attribute 'layer'
----------------------------------------------------------------------
File ".\pyffi\tests\formats\nif\bhkpackednitristripsshape.txt", line 42, in bhkpackednitristripsshape.txt
Failed example:
shape.data.sub_shapes[0].num_vertices
Expected:
3
Got:
0
----------------------------------------------------------------------
File ".\pyffi\tests\formats\nif\bhkpackednitristripsshape.txt", line 44, in bhkpackednitristripsshape.txt
Failed example:
shape.data.sub_shapes[0].material
Expected:
2
Got:
<pyffi.formats.nif.HavokMaterial object at 0x00000000042CDA20>
----------------------------------------------------------------------
File ".\pyffi\tests\formats\nif\bhkpackednitristripsshape.txt", line 46, in bhkpackednitristripsshape.txt
Failed example:
shape.data.sub_shapes[1].layer
Exception raised:
Traceback (most recent call last):
File "C:\Python34\Lib\doctest.py", line 1318, in __run
compileflags, 1), test.globs)
File "<doctest bhkpackednitristripsshape.txt[23]>", line 1, in <module>
shape.data.sub_shapes[1].layer
AttributeError: 'OblivionSubShape' object has no attribute 'layer'
----------------------------------------------------------------------
File ".\pyffi\tests\formats\nif\bhkpackednitristripsshape.txt", line 48, in bhkpackednitristripsshape.txt
Failed example:
shape.data.sub_shapes[1].num_vertices
Expected:
4
Got:
0
----------------------------------------------------------------------
File ".\pyffi\tests\formats\nif\bhkpackednitristripsshape.txt", line 50, in bhkpackednitristripsshape.txt
Failed example:
shape.data.sub_shapes[1].material
Expected:
4
Got:
<pyffi.formats.nif.HavokMaterial object at 0x00000000042AEA58>
----------------------------------------------------------------------
File ".\pyffi\tests\formats\nif\bhkpackednitristripsshape.txt", line 52, in bhkpackednitristripsshape.txt
Failed example:
shape.data.num_triangles
Expected:
3
Got:
0
----------------------------------------------------------------------
File ".\pyffi\tests\formats\nif\bhkpackednitristripsshape.txt", line 54, in bhkpackednitristripsshape.txt
Failed example:
shape.data.num_vertices
Expected:
7
Got:
0
----------------------------------------------------------------------
Ran 1 test in 0.012s
File ".\pyffi\tests\spells\nif\opt_collisiongeometry.txt", line 35, in opt_collisiongeometry.txt
Failed example:
spell.recurse() # doctest: +REPORT_NDIFF
Exception raised:
Traceback (most recent call last):
File "C:\Python34\Lib\doctest.py", line 1318, in __run
compileflags, 1), test.globs)
File "<doctest opt_collisiongeometry.txt[13]>", line 1, in <module>
spell.recurse() # doctest: +REPORT_NDIFF
File ".\pyffi\pyffi\spells\__init__.py", line 291, in recurse
self.recurse(child)
File ".\pyffi\pyffi\spells\__init__.py", line 305, in recurse
self.recurse(child)
File ".\pyffi\pyffi\spells\__init__.py", line 305, in recurse
self.recurse(child)
File ".\pyffi\pyffi\spells\__init__.py", line 305, in recurse
self.recurse(child)
File ".\pyffi\pyffi\spells\__init__.py", line 300, in recurse
if self.branchentry(branch):
File ".\pyffi\pyffi\spells\nif\optimize.py", line 1067, in branchentry
self.optimize_mopp(branch)
File ".\pyffi\pyffi\spells\nif\optimize.py", line 1046, in optimize_mopp
mopp.update_mopp_welding()
File ".\pyffi\pyffi\formats\nif\__init__.py", line 2486, in update_mopp_welding
material_per_triangle)
File ".\pyffi\pyffi\utils\mopp.py", line 168, in getMopperOriginScaleCodeWelding
infile.write("%i\n" % matindex)
TypeError: %i format: a number is required, not HavokMaterial
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collisiongeometry.txt", line 66, in opt_collisiongeometry.txt
Failed example:
print(str(data.roots[0].collision_object.body.shape.shape.data.triangles[-1])) # doctest: +ELLIPSIS
Expected:
<class 'pyffi.formats.nif.hkTriangle'> instance at ...
* triangle :
<class 'pyffi.formats.nif.Triangle'> instance at ...
* v_1 : 12
* v_2 : 16
* v_3 : 4
* welding_info : 18924
* normal : [ -0.904 0.197 -0.380 ]
<BLANKLINE>
Got:
<class 'pyffi.formats.nif.hkTriangle'> instance at 0x042DE5C0
* triangle :
<class 'pyffi.formats.nif.Triangle'> instance at 0x042DE8D0
* v_1 : 12
* v_2 : 16
* v_3 : 4
* welding_info : 18866
* normal : [ -0.904 0.197 -0.380 ]
<BLANKLINE>
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collisiongeometry.txt", line 92, in opt_collisiongeometry.txt
Failed example:
spell.recurse() # doctest: +REPORT_NDIFF
Exception raised:
Traceback (most recent call last):
File "C:\Python34\Lib\doctest.py", line 1318, in __run
compileflags, 1), test.globs)
File "<doctest opt_collisiongeometry.txt[25]>", line 1, in <module>
spell.recurse() # doctest: +REPORT_NDIFF
File ".\pyffi\pyffi\spells\__init__.py", line 291, in recurse
self.recurse(child)
File ".\pyffi\pyffi\spells\__init__.py", line 305, in recurse
self.recurse(child)
File ".\pyffi\pyffi\spells\__init__.py", line 305, in recurse
self.recurse(child)
File ".\pyffi\pyffi\spells\__init__.py", line 300, in recurse
if self.branchentry(branch):
File ".\pyffi\pyffi\spells\nif\optimize.py", line 1078, in branchentry
if branch.layer == NifFormat.OblivionLayer.OL_CLUTTER:
AttributeError: 'bhkRigidBodyT' object has no attribute 'layer'
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collisiongeometry.txt", line 129, in opt_collisiongeometry.txt
Failed example:
data.roots[0].collision_object.body.shape.shape.sub_shapes[0].num_vertices
Exception raised:
Traceback (most recent call last):
File "C:\Python34\Lib\doctest.py", line 1318, in __run
compileflags, 1), test.globs)
File "<doctest opt_collisiongeometry.txt[26]>", line 1, in <module>
data.roots[0].collision_object.body.shape.shape.sub_shapes[0].num_vertices
AttributeError: 'bhkNiTriStripsShape' object has no attribute 'shape'
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collisiongeometry.txt", line 131, in opt_collisiongeometry.txt
Failed example:
data.roots[0].collision_object.body.shape.shape.data.num_vertices
Exception raised:
Traceback (most recent call last):
File "C:\Python34\Lib\doctest.py", line 1318, in __run
compileflags, 1), test.globs)
File "<doctest opt_collisiongeometry.txt[27]>", line 1, in <module>
data.roots[0].collision_object.body.shape.shape.data.num_vertices
AttributeError: 'bhkNiTriStripsShape' object has no attribute 'shape'
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collisiongeometry.txt", line 133, in opt_collisiongeometry.txt
Failed example:
data.roots[0].collision_object.body.shape.shape.data.num_triangles
Exception raised:
Traceback (most recent call last):
File "C:\Python34\Lib\doctest.py", line 1318, in __run
compileflags, 1), test.globs)
File "<doctest opt_collisiongeometry.txt[28]>", line 1, in <module>
data.roots[0].collision_object.body.shape.shape.data.num_triangles
AttributeError: 'bhkNiTriStripsShape' object has no attribute 'shape'
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collisiongeometry.txt", line 156, in opt_collisiongeometry.txt
Failed example:
spell.recurse() # doctest: +REPORT_NDIFF
Exception raised:
Traceback (most recent call last):
File "C:\Python34\Lib\doctest.py", line 1318, in __run
compileflags, 1), test.globs)
File "<doctest opt_collisiongeometry.txt[40]>", line 1, in <module>
spell.recurse() # doctest: +REPORT_NDIFF
File ".\pyffi\pyffi\spells\__init__.py", line 291, in recurse
self.recurse(child)
File ".\pyffi\pyffi\spells\__init__.py", line 305, in recurse
self.recurse(child)
File ".\pyffi\pyffi\spells\__init__.py", line 305, in recurse
self.recurse(child)
File ".\pyffi\pyffi\spells\__init__.py", line 300, in recurse
if self.branchentry(branch):
File ".\pyffi\pyffi\spells\nif\optimize.py", line 1099, in branchentry
for sub_shape in branch.shape.get_sub_shapes()):
File ".\pyffi\pyffi\spells\nif\optimize.py", line 1099, in <genexpr>
for sub_shape in branch.shape.get_sub_shapes()):
AttributeError: 'OblivionSubShape' object has no attribute 'layer'
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collisiongeometry.txt", line 192, in opt_collisiongeometry.txt
Failed example:
data.roots[0].collision_object.body.shape.shape.sub_shapes[0].num_vertices
Exception raised:
Traceback (most recent call last):
File "C:\Python34\Lib\doctest.py", line 1318, in __run
compileflags, 1), test.globs)
File "<doctest opt_collisiongeometry.txt[41]>", line 1, in <module>
data.roots[0].collision_object.body.shape.shape.sub_shapes[0].num_vertices
AttributeError: 'bhkPackedNiTriStripsShape' object has no attribute 'shape'
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collisiongeometry.txt", line 194, in opt_collisiongeometry.txt
Failed example:
data.roots[0].collision_object.body.shape.shape.data.num_vertices
Exception raised:
Traceback (most recent call last):
File "C:\Python34\Lib\doctest.py", line 1318, in __run
compileflags, 1), test.globs)
File "<doctest opt_collisiongeometry.txt[42]>", line 1, in <module>
data.roots[0].collision_object.body.shape.shape.data.num_vertices
AttributeError: 'bhkPackedNiTriStripsShape' object has no attribute 'shape'
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collisiongeometry.txt", line 196, in opt_collisiongeometry.txt
Failed example:
data.roots[0].collision_object.body.shape.shape.data.num_triangles
Exception raised:
Traceback (most recent call last):
File "C:\Python34\Lib\doctest.py", line 1318, in __run
compileflags, 1), test.globs)
File "<doctest opt_collisiongeometry.txt[43]>", line 1, in <module>
data.roots[0].collision_object.body.shape.shape.data.num_triangles
AttributeError: 'bhkPackedNiTriStripsShape' object has no attribute 'shape'
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collisiongeometry.txt", line 216, in opt_collisiongeometry.txt
Failed example:
spell.recurse() # doctest: +REPORT_NDIFF
Exception raised:
Traceback (most recent call last):
File "C:\Python34\Lib\doctest.py", line 1318, in __run
compileflags, 1), test.globs)
File "<doctest opt_collisiongeometry.txt[52]>", line 1, in <module>
spell.recurse() # doctest: +REPORT_NDIFF
File ".\pyffi\pyffi\spells\__init__.py", line 291, in recurse
self.recurse(child)
File ".\pyffi\pyffi\spells\__init__.py", line 305, in recurse
self.recurse(child)
File ".\pyffi\pyffi\spells\__init__.py", line 305, in recurse
self.recurse(child)
File ".\pyffi\pyffi\spells\__init__.py", line 305, in recurse
self.recurse(child)
File ".\pyffi\pyffi\spells\__init__.py", line 300, in recurse
if self.branchentry(branch):
File ".\pyffi\pyffi\spells\nif\optimize.py", line 1067, in branchentry
self.optimize_mopp(branch)
File ".\pyffi\pyffi\spells\nif\optimize.py", line 1046, in optimize_mopp
mopp.update_mopp_welding()
File ".\pyffi\pyffi\formats\nif\__init__.py", line 2486, in update_mopp_welding
material_per_triangle)
File ".\pyffi\pyffi\utils\mopp.py", line 168, in getMopperOriginScaleCodeWelding
infile.write("%i\n" % matindex)
TypeError: %i format: a number is required, not HavokMaterial
======================================================================
FAIL: .\pyffi\tests\spells\nif\opt_collision_to_box_shape.txt
Doctest: opt_collision_to_box_shape.txt
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Python34\Lib\doctest.py", line 2187, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for opt_collision_to_box_shape.txt
File ".\pyffi\tests\spells\nif\opt_collision_to_box_shape.txt", line 0
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collision_to_box_shape.txt", line 20, in opt_collision_to_box_shape.txt
Failed example:
data.roots[0].collision_object.body.shape.sub_shapes[0].material
Expected:
0
Got:
<pyffi.formats.nif.HavokMaterial object at 0x00000000052DEE48>
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collision_to_box_shape.txt", line 44, in opt_collision_to_box_shape.txt
Failed example:
data.roots[0].collision_object.body.shape.material
Expected:
0
Got:
<pyffi.formats.nif.HavokMaterial object at 0x00000000052DEE48>
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collision_to_box_shape.txt", line 62, in opt_collision_to_box_shape.txt
Failed example:
data.roots[0].collision_object.body.shape.material
Expected:
9
Got:
<pyffi.formats.nif.HavokMaterial object at 0x000000000557EF98>
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collision_to_box_shape.txt", line 74, in opt_collision_to_box_shape.txt
Failed example:
data.roots[0].collision_object.body.shape.material
Expected:
9
Got:
<pyffi.formats.nif.HavokMaterial object at 0x000000000557EF98>
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collision_to_box_shape.txt", line 76, in opt_collision_to_box_shape.txt
Failed example:
data.roots[0].collision_object.body.shape.shape.material
Expected:
9
Got:
<pyffi.formats.nif.HavokMaterial object at 0x000000000557EF98>
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collision_to_box_shape.txt", line 96, in opt_collision_to_box_shape.txt
Failed example:
data.roots[0].collision_object.body.shape.sub_shapes[0].material
Expected:
9
Got:
<pyffi.formats.nif.HavokMaterial object at 0x00000000042769E8>
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collision_to_box_shape.txt", line 108, in opt_collision_to_box_shape.txt
Failed example:
data.roots[0].collision_object.body.shape.material
Expected:
9
Got:
<pyffi.formats.nif.HavokMaterial object at 0x00000000042769E8>
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collision_to_box_shape.txt", line 110, in opt_collision_to_box_shape.txt
Failed example:
data.roots[0].collision_object.body.shape.shape.material
Expected:
9
Got:
<pyffi.formats.nif.HavokMaterial object at 0x00000000042769E8>
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collision_to_box_shape.txt", line 125, in opt_collision_to_box_shape.txt
Failed example:
data.roots[0].collision_object.body.shape.shape.sub_shapes[0].num_vertices
Exception raised:
Traceback (most recent call last):
File "C:\Python34\Lib\doctest.py", line 1318, in __run
compileflags, 1), test.globs)
File "<doctest opt_collision_to_box_shape.txt[44]>", line 1, in <module>
data.roots[0].collision_object.body.shape.shape.sub_shapes[0].num_vertices
AttributeError: 'bhkPackedNiTriStripsShape' object has no attribute 'shape'
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collision_to_box_shape.txt", line 127, in opt_collision_to_box_shape.txt
Failed example:
data.roots[0].collision_object.body.shape.shape.data.num_vertices
Exception raised:
Traceback (most recent call last):
File "C:\Python34\Lib\doctest.py", line 1318, in __run
compileflags, 1), test.globs)
File "<doctest opt_collision_to_box_shape.txt[45]>", line 1, in <module>
data.roots[0].collision_object.body.shape.shape.data.num_vertices
AttributeError: 'bhkPackedNiTriStripsShape' object has no attribute 'shape'
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collision_to_box_shape.txt", line 129, in opt_collision_to_box_shape.txt
Failed example:
data.roots[0].collision_object.body.shape.shape.sub_shapes[0].material
Exception raised:
Traceback (most recent call last):
File "C:\Python34\Lib\doctest.py", line 1318, in __run
compileflags, 1), test.globs)
File "<doctest opt_collision_to_box_shape.txt[46]>", line 1, in <module>
data.roots[0].collision_object.body.shape.shape.sub_shapes[0].material
AttributeError: 'bhkPackedNiTriStripsShape' object has no attribute 'shape'
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collision_to_box_shape.txt", line 133, in opt_collision_to_box_shape.txt
Failed example:
spell.recurse()
Expected:
pyffi.toaster:INFO:--- opt_collisionbox ---
pyffi.toaster:INFO: ~~~ NiNode [TestBhkMoppBvTreeShape] ~~~
pyffi.toaster:INFO: ~~~ bhkCollisionObject [] ~~~
pyffi.toaster:INFO: ~~~ bhkRigidBodyT [] ~~~
pyffi.toaster:INFO: ~~~ bhkMoppBvTreeShape [] ~~~
pyffi.toaster:INFO: optimized box collision
pyffi.toaster:INFO: ~~~ NiTriShape [Stuff] ~~~
Got:
pyffi.toaster:INFO:--- opt_collisionbox ---
pyffi.toaster:INFO: ~~~ NiNode [TestBhkPackedNiTriStripsShape] ~~~
pyffi.toaster:INFO: ~~~ bhkCollisionObject [] ~~~
pyffi.toaster:INFO: ~~~ bhkRigidBodyT [] ~~~
pyffi.toaster:INFO: optimized box collision
pyffi.toaster:INFO: ~~~ NiTriShape [Stuff] ~~~
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collision_to_box_shape.txt", line 142, in opt_collision_to_box_shape.txt
Failed example:
data.roots[0].collision_object.body.shape.material
Expected:
9
Got:
<pyffi.formats.nif.HavokMaterial object at 0x00000000052B0198>
----------------------------------------------------------------------
File ".\pyffi\tests\spells\nif\opt_collision_to_box_shape.txt", line 144, in opt_collision_to_box_shape.txt
Failed example:
data.roots[0].collision_object.body.shape.shape.material
Expected:
9
Got:
<pyffi.formats.nif.HavokMaterial object at 0x00000000052B0198>
Similar Known Issues
N\A
Additional Information
Enable 'formats/nif/niftoaster.txt', in test_doctests.py to allow running of the niftoaster docstring tests.
@niftools/pyffi-reviewer
Issue Overview
Test failures due to changes in implementation of HavokMaterial layer information
Version Information
Pyffi Version Info
2.2.3
Platform information
win32
Context
DocString tests are failing when executed
Steps to Reproduce
. Update test_doctest.py to include the above doctest paths
. py.test -v /tests/test_doctests.py
Expected Result
Test should pass without failure
Actual Result
Test is failing as its attempting to assign an object type HavokMaterial as a formatted integer string
Possible Fix
Update required due to nif.xml changes to HavokMaterial, spells needs to be updated to extract layer information.
Screenshot
N\A
Logs and Files
[Provide the generated log output and any accompanying files for the format related to the issue]
Console Output
Similar Known Issues
N\A
Additional Information
Enable 'formats/nif/niftoaster.txt', in test_doctests.py to allow running of the niftoaster docstring tests.