#NEWLINE# def internaltest_cfg( p ) : #NEWLINE# #INDENT# state = tempfile . TemporaryFile ( ) #NEWLINE# cfg = p . analyses . CFG ( ) #NEWLINE# pickle . dump ( p , state ) #NEWLINE# state . seek ( 0 ) #NEWLINE# cfg2 = pickle . load ( state ) #NEWLINE# nose . tools . assert_equals ( set ( cfg . nodes ( ) ) , set ( cfg2 . nodes ( ) ) ) #NEWLINE# nose . tools . assert_equals ( cfg . unresolvables , cfg2 . unresolvables ) #NEWLINE# nose . tools . assert_set_equal ( set ( cfg . deadends ) , set ( cfg2 . deadends ) ) #NEWLINE# return cfg