@@ -32,6 +32,7 @@ def test_bones(self):
3232 bones = []
3333 with open ('tests/test_freebvh.bvh' ) as f :
3434 mocap = Bvh (f .read ())
35+
3536 def iterate_joints (joint ):
3637 bones .append (str (joint ))
3738 for child in joint .filter ('JOINT' ):
@@ -118,7 +119,7 @@ def test_frame_channel(self):
118119 self .assertEqual (mocap .frame_joint_channel (22 , 'Neck' , 'Xrotation' ), - 6.77 )
119120 self .assertEqual (mocap .frame_joint_channel (22 , 'Head' , 'Yrotation' ), 8.47 )
120121
121- def test_frame_channel (self ):
122+ def test_frame_channel2 (self ):
122123 with open ('tests/test_freebvh.bvh' ) as f :
123124 mocap = Bvh (f .read ())
124125 self .assertEqual (mocap .frame_joint_channel (22 , 'mixamorig:Hips' , 'Xposition' ), 4.3314 )
@@ -128,7 +129,7 @@ def test_frame_iteration(self):
128129 mocap = Bvh (f .read ())
129130 x_accumulator = 0.0
130131 for i in range (0 , mocap .nframes ):
131- x_accumulator += mocap .frame_joint_channel (i , 'Hips' , 'Xposition' )
132+ x_accumulator += mocap .frame_joint_channel (i , 'Hips' , 'Xposition' )
132133 self .assertTrue (abs (- 19735.902699999995 - x_accumulator ) < 0.0001 )
133134
134135 def test_joints_names (self ):
@@ -151,16 +152,15 @@ def test_joint_parent(self):
151152 def test_frame_joint_multi_channels (self ):
152153 with open ('tests/test_mocapbank.bvh' ) as f :
153154 mocap = Bvh (f .read ())
154- rotation = mocap .frame_joint_channels (30 , 'Head' , ['Xrotation' , 'Yrotation' , 'Zrotation' ])
155+ rotation = mocap .frame_joint_channels (30 , 'Head' , ['Xrotation' , 'Yrotation' , 'Zrotation' ])
155156 self .assertEqual (rotation , [1.77 , 13.94 , - 7.42 ])
156157
157158 def test_frames_multi_channels (self ):
158159 with open ('tests/test_mocapbank.bvh' ) as f :
159160 mocap = Bvh (f .read ())
160- rotations = mocap .frames_joint_channels ('Head' , ['Xrotation' , 'Yrotation' , 'Zrotation' ])
161+ rotations = mocap .frames_joint_channels ('Head' , ['Xrotation' , 'Yrotation' , 'Zrotation' ])
161162 self .assertEqual (len (rotations ), mocap .nframes )
162163
163164
164165if __name__ == '__main__' :
165166 unittest .main ()
166-
0 commit comments