@@ -689,7 +689,7 @@ def test_apply_action_break_bond(self):
689689 bond = bond0 .copy ()
690690 try :
691691 bond .apply_action (action )
692- self . fail ( "Bond.apply_action() unexpectedly processed a BREAK_BOND action " "with order {0}." .format (order0 ) )
692+ assert False , "Bond.apply_action() unexpectedly processed a BREAK_BOND action " "with order {0}." .format (order0 )
693693 except ActionError :
694694 pass
695695
@@ -703,7 +703,7 @@ def test_apply_action_form_bond(self):
703703 bond = bond0 .copy ()
704704 try :
705705 bond .apply_action (action )
706- self . fail ( "Bond.apply_action() unexpectedly processed a FORM_BOND action " "with order {0}." .format (order0 ) )
706+ assert False , "Bond.apply_action() unexpectedly processed a FORM_BOND action " "with order {0}." .format (order0 )
707707 except ActionError :
708708 pass
709709
@@ -743,7 +743,7 @@ def test_apply_action_gain_radical(self):
743743 bond = bond0 .copy ()
744744 try :
745745 bond .apply_action (action )
746- self . fail ( "Bond.apply_action() unexpectedly processed a GAIN_RADICAL action " "with order {0}." .format (order0 ) )
746+ assert False , "Bond.apply_action() unexpectedly processed a GAIN_RADICAL action " "with order {0}." .format (order0 )
747747 except ActionError :
748748 pass
749749
@@ -757,7 +757,7 @@ def test_apply_action_lose_radical(self):
757757 bond = bond0 .copy ()
758758 try :
759759 bond .apply_action (action )
760- self . fail ( "Bond.apply_action() unexpectedly processed a LOSE_RADICAL action " "with order {0}." .format (order0 ) )
760+ assert False , "Bond.apply_action() unexpectedly processed a LOSE_RADICAL action " "with order {0}." .format (order0 )
761761 except ActionError :
762762 pass
763763
@@ -999,7 +999,7 @@ def test_get_labeled_atom(self):
999999 assert atom == self .molecule [0 ].get_labeled_atoms (atom .label )[0 ]
10001000 try :
10011001 self .molecule [0 ].get_labeled_atoms ("*3" )[0 ]
1002- self . fail ( "Unexpected successful return from Molecule.get_labeled_atoms() with invalid atom label." )
1002+ assert False , "Unexpected successful return from Molecule.get_labeled_atoms() with invalid atom label."
10031003 except ValueError :
10041004 pass
10051005
@@ -2190,7 +2190,7 @@ def test_large_mol_update(self):
21902190 try :
21912191 mol .update_connectivity_values ()
21922192 except OverflowError :
2193- self . fail ( "update_connectivity_values() raised OverflowError unexpectedly!" )
2193+ assert False , "update_connectivity_values() raised OverflowError unexpectedly!"
21942194
21952195 def test_large_mol_creation (self ):
21962196 """
@@ -2202,7 +2202,7 @@ def test_large_mol_creation(self):
22022202 try :
22032203 Molecule (smiles = smi )
22042204 except OverflowError :
2205- self . fail ( "Creation of C{} failed!" .format (i ) )
2205+ assert False , "Creation of C{} failed!" .format (i )
22062206
22072207 def test_get_polycyclic_rings (self ):
22082208 """
0 commit comments