def runTest(self, 
                scene, 
                padX=None, 
                padY=None, 
                direction=Qt.Horizontal):
        """
        Sets up a test for the node layout.
        """
        nodes = {}
        for letter in 'abcdefghi':
            node = scene.addNode(point='center')
            node.setDisplayName(letter)
            nodes[letter] = node
        
        for con in ('ea', 'eb', 'bf', 'cf', 'gc', 'gd', 'di', 'hi', 'ec', 'ia'):
            o_node = nodes[con[0]]
            i_node = nodes[con[1]]
            
            connection = scene.addConnection()
            connection.setInputNode(i_node)
            connection.setOutputNode(o_node)
        
        self._testing = True
        self.layout(scene, nodes.values(), padX, padY, direction)
        self._testing = False
def runTest ( self , scene , padX = None , padY = None , direction = Qt . Horizontal ) : nodes = { } for letter in 'abcdefghi' : node = scene . addNode ( point = 'center' ) node . setDisplayName ( letter ) nodes [ letter ] = node for con in ( 'ea' , 'eb' , 'bf' , 'cf' , 'gc' , 'gd' , 'di' , 'hi' , 'ec' , 'ia' ) : o_node = nodes [ con [ 0 ] ] i_node = nodes [ con [ 1 ] ] connection = scene . addConnection ( ) connection . setInputNode ( i_node ) connection . setOutputNode ( o_node ) self . _testing = True self . layout ( scene , nodes . values ( ) , padX , padY , direction ) self . _testing = False
Sets up a test for the node layout.