@@ -256,7 +256,7 @@ def test_convergence_with_singular_system(self):
256256 equality_constraints = [("P" , 1.0e5 ), ("T" , 1000.0 )]
257257 sol , _ = equilibrate (composition , a , equality_constraints )
258258 self .assertTrue (sol .success ) # Expect successful convergence
259- self .assertTrue (sol .code == 5 ) # Expect singular system at solution
259+ self .assertEqual (sol .code , 5 ) # Expect singular system at solution
260260
261261 def test_ill_posed_problem (self ):
262262
@@ -269,7 +269,7 @@ def test_ill_posed_problem(self):
269269 a .phases [1 ].set_composition ([0.5 , 0.5 ])
270270 equality_constraints = [("P" , 1.0e5 ), ("T" , 300.0 )]
271271 sol , _ = equilibrate (composition , a , equality_constraints )
272- self .assertTrue (sol .code == 2 ) # Expect problem to leave the feasible region
272+ self .assertEqual (sol .code , 2 ) # Expect problem to leave the feasible region
273273
274274 def test_ill_conditioned_jacobian (self ):
275275
@@ -282,7 +282,7 @@ def test_ill_conditioned_jacobian(self):
282282 a .phases [1 ].set_composition ([0.4 , 0.6 ])
283283 equality_constraints = [("P" , 1.0e5 ), ("T" , 300.0 )]
284284 sol , _ = equilibrate (composition , a , equality_constraints )
285- self .assertTrue (sol .code == 4 ) # Expect singular system
285+ self .assertEqual (sol .code , 4 ) # Expect singular system
286286
287287
288288if __name__ == "__main__" :
0 commit comments