@@ -108,10 +108,40 @@ def test_list():
108108 assert T .list == [1.0 , 0.0 , 0.0 , 0.0 , 0.0 , 1.0 , 0.0 , 0.0 , 0.0 , 0.0 , 1.0 , 0.0 , 0.0 , 0.0 , 0.0 , 1.0 ]
109109
110110
111- def concatenate ():
111+ def test_concatenated ():
112112 trans1 = [1 , 2 , 3 ]
113113 angle1 = [- 2.142 , 1.141 , - 0.142 ]
114114 T1 = Translation .from_vector (trans1 )
115115 R1 = Rotation .from_euler_angles (angle1 )
116- M1 = T1 .concatenate (R1 )
116+ M1 = T1 .concatenated (R1 )
117117 assert allclose (M1 , T1 * R1 )
118+
119+
120+ def test___repr__ ():
121+ trans = [1 , 2 , 3 ]
122+ axes = [- 2.142 , 1.141 , - 0.142 ]
123+ angle = 0.7854
124+ R = Rotation .from_axis_and_angle (axes , angle , point = trans )
125+ assert R == eval (repr (R ))
126+
127+
128+ def test___str__ ():
129+ s = '[[ 0.9345, -0.0798, 0.3469, -0.8157],\n ' + \
130+ ' [ -0.1624, 0.7716, 0.6150, -1.2258],\n ' + \
131+ ' [ -0.3168, -0.6311, 0.7081, 2.4546],\n ' + \
132+ ' [ 0.0000, 0.0000, 0.0000, 1.0000]]\n '
133+ trans = [1 , 2 , 3 ]
134+ axes = [- 2.142 , 1.141 , - 0.142 ]
135+ angle = 0.7854
136+ R = Rotation .from_axis_and_angle (axes , angle , point = trans )
137+ assert s == str (R )
138+
139+
140+ def test___eq__ ():
141+ i1 = Transformation ()
142+ i2 = Transformation ()
143+ t = Translation .from_vector ([1 , 0 , 0 ])
144+ assert i1 == i2
145+ assert not (i1 != i2 )
146+ assert i1 != t
147+ assert not (i1 == t )
0 commit comments