Exemplo n.º 1
0
 def testL2GraphGenerate(self):
     g = l2Graph(graphName)
     g.addDevices( deviceConns )
     g.generate()
     self.assertTrue( os.path.isfile(graphFilenameNeatoPng) )
     self.assertTrue( os.path.isfile(graphFilenameFdpPng) )
     self.assertTrue( os.path.isfile(graphFilenameDot) )        
     pass
Exemplo n.º 2
0
def main():
    import argparse
    parser = argparse.ArgumentParser()
    parser.add_argument("rstFilename", help="reStructured text file to use")
    args = parser.parse_args()

    print args.rstFilename
    
    # read data
    r = restReader( args.rstFilename )
    hwList = r.hardwareList
    deviceConns = {}
    for dev in hwList:
        deviceConns[hwList[dev]] = r.getDeviceInfo( dev )

    # output graphs
    g = l2Graph(args.rstFilename)
    g.addDevices( deviceConns )
    g.generate()
Exemplo n.º 3
0
 def testL2Graph(self):
     g = l2Graph(graphName)
     g.addDevices( deviceConns )
     self.assertEqual( g.dotText, graphOut )
     pass