@@ -165,23 +165,24 @@ def test_initialize_components(tcc):
165165
166166tcso = [([ComponentSignal ([0 ,.5 ,1 ,1.5 ],20 ,0 )],1 ,20 ),
167167 ([ComponentSignal ([0 ,.5 ,1 ,1.5 ],20 ,0 )],4 ,20 ),
168- ([ComponentSignal ([0 ,.5 ,1 ,1.5 ],20 ,0 )],0 ,20 ),
169- ([ComponentSignal ([0 ,.5 ,1 ,1.5 ],20 ,0 )],- 2 ,20 ),
170- ([ComponentSignal ([0 ,.5 ,1 ,1.5 ],20 ,0 )],1 ,0 ),
171- ([ComponentSignal ([0 ,.5 ,1 ,1.5 ],20 ,0 )],1 ,- 3 ),
172- ([ComponentSignal ([0 ,.5 ,1 ,1.5 ],20 ,0 ),ComponentSignal ([0 ,.5 ,1 ,1.5 ],20 ,1 )],1 ,20 ),
173- ([ComponentSignal ([0 ,.5 ,1 ,1.5 ],20 ,0 ),ComponentSignal ([0 ,.5 ,1 ,21.5 ],20 ,1 )],1 ,20 ),
174- ([ComponentSignal ([0 ,1 ,1.5 ],20 ,0 ),ComponentSignal ([0 ,.5 ,1 ,21.5 ],20 ,1 )],1 ,20 ),
168+ # ([ComponentSignal([0,.5,1,1.5],20,0)],0,20), # Raises an exception
169+ # ([ComponentSignal([0,.5,1,1.5],20,0)],-2,20), # Raises an exception
170+ # ([ComponentSignal([0,.5,1,1.5],20,0)],1,0), # Raises an Exception
171+ # ([ComponentSignal([0,.5,1,1.5],20,0)],1,-3), # Raises an exception
172+ ([ComponentSignal ([0 ,.5 ,1 ,1.5 ],20 ,0 ),ComponentSignal ([0 ,.5 ,1 ,1.5 ],20 ,1 )],2 ,20 ),
173+ ([ComponentSignal ([0 ,.5 ,1 ,1.5 ],20 ,0 ),ComponentSignal ([0 ,.5 ,1 ,21.5 ],20 ,1 )],2 ,20 ),
174+ ([ComponentSignal ([0 ,1 ,1.5 ],20 ,0 ),ComponentSignal ([0 ,.5 ,1 ,21.5 ],20 ,1 )],2 ,20 ),
175175 ([ComponentSignal ([0 ,.5 ,1 ,1.5 ],20 ,0 ),ComponentSignal ([0 ,.5 ,1 ,1.5 ],20 ,1 )],1 ,- 3 ),
176176 ([],1 ,20 ),
177177 ([],- 1 ,20 ),
178- ([],0 ,20 ),
179- ([],1 ,0 ),
178+ ([],0 ,20 ), # Raises an exception
179+ ([],1 ,0 ), #Raises an exception
180180 ([],- 1 ,- 2 ),
181181
182182]
183183@pytest .mark .parametrize ('tcso' ,tcso )
184184def test_construct_stretching_matrix (tcso ):
185185 actual = construct_stretching_matrix (tcso [0 ],tcso [1 ],tcso [2 ])
186186 for component in tcso [0 ]:
187- assert actual [component .id , :] == component .stretching_factors
187+ np .testing .assert_allclose (actual [component .id ,:], component .stretching_factors )
188+ #assert actual[component.id, :] == component.stretching_factors
0 commit comments