def setUp(self): G = Graph(test_vertices(),test_edges()) self.D = Drawing(G,1000,1000) self.D.draw()
def setUp(self): self.G = Graph( test_vertices(), test_edges() ) self.h = 1000 self.w = 2000 self.k = int(sqrt((self.h*self.w)/self.G.n)) # 632 self.D = ForceDrawing( self.G, self.h, self.w )
def test_init(self): self.assertEqual( self.D.G, Graph( test_vertices(), test_edges() ) ) self.assertEqual( self.D.h, self.h) self.assertEqual( self.D.w, self.w) self.assertEqual( self.D.k, self.k )