#NEWLINE# def testpruning_06_silent_popitem( self ) : #NEWLINE# #INDENT# p1 = sample_tree ( ) #NEWLINE# p1 . testnode = 123 #NEWLINE# p2 = deepcopy ( p1 ) #NEWLINE# self . assert_ ( ( p1 == p2 ) ) #NEWLINE# self . assertRaises ( KeyError , ( lambda : p1 . popitem ( 'testnode_nonexistent' ) ) ) #NEWLINE# p1 . pop ( 'testnode_nonexistent' , silent = True ) #NEWLINE# self . assert_ ( ( p1 == p2 ) ) #NEWLINE# self . assert_ ( ( 'testnode' in p1 ) ) #NEWLINE# p1 . popitem ( 'testnode' , silent = True ) #NEWLINE# self . assert_ ( ( p1 != self ) ) #NEWLINE# self . assert_ ( ( 'testnode' not in p1 ) )