#NEWLINE# def test_dotprint( ) : #NEWLINE# #INDENT# text = dotprint ( ( x + 2 ) , repeat = False ) #NEWLINE# assert all ( ( ( e in text ) for e in dotedges ( ( x + 2 ) , repeat = False ) ) ) #NEWLINE# assert all ( ( ( n in text ) for n in [ dotnode ( expr , repeat = False ) for expr in ( x , Integer ( 2 ) , ( x + 2 ) ) ] ) ) #NEWLINE# assert ( 'digraph' in text ) #NEWLINE# text = dotprint ( ( x + ( x ** 2 ) ) , repeat = False ) #NEWLINE# assert all ( ( ( e in text ) for e in dotedges ( ( x + ( x ** 2 ) ) , repeat = False ) ) ) #NEWLINE# assert all ( ( ( n in text ) for n in [ dotnode ( expr , repeat = False ) for expr in ( x , Integer ( 2 ) , ( x ** 2 ) ) ] ) ) #NEWLINE# assert ( 'digraph' in text ) #NEWLINE# text = dotprint ( ( x + ( x ** 2 ) ) , repeat = True ) #NEWLINE# assert all ( ( ( e in text ) for e in dotedges ( ( x + ( x ** 2 ) ) , repeat = True ) ) ) #NEWLINE# assert all ( ( ( n in text ) for n in [ dotnode ( expr , pos = ( ) ) for expr in [ ( x + ( x ** 2 ) ) ] ] ) ) #NEWLINE# text = dotprint ( ( x ** x ) , repeat = True ) #NEWLINE# assert all ( ( ( e in text ) for e in dotedges ( ( x ** x ) , repeat = True ) ) ) #NEWLINE# assert all ( ( ( n in text ) for n in [ dotnode ( x , pos = ( 0 , ) ) , dotnode ( x , pos = ( 1 , ) ) ] ) ) #NEWLINE# assert ( 'digraph' in text )