#NEWLINE# def test_link_removal( self ) : #NEWLINE# #INDENT# traj = Trajectory ( ) #NEWLINE# traj . f_add_parameter_group ( 'test' ) #NEWLINE# traj . f_add_parameter_group ( 'test2' ) #NEWLINE# traj . test . f_add_link ( 'circle1' , traj . test2 ) #NEWLINE# traj . test2 . f_add_link ( 'circle2' , traj . test ) #NEWLINE# self . assertTrue ( ( 'circle1' in traj ) ) #NEWLINE# traj . circle1 . circle2 . f_remove_link ( 'circle1' ) #NEWLINE# self . assertTrue ( ( 'circle1' not in traj . circle2 ) ) #NEWLINE# with self . assertRaises ( AttributeError ) : #NEWLINE# #INDENT# traj . test . circle1 #NEWLINE# #UNINDENT# with self . assertRaises ( ValueError ) : #NEWLINE# #INDENT# traj . test . f_remove_link ( 'circle1' ) #NEWLINE# #UNINDENT# traj . test2 . f_remove_child ( 'circle2' ) #NEWLINE# self . assertTrue ( ( 'circle2' not in traj ) )