示例#1
0
 def test_size(self):
     assert 0 == Graph().size()
     assert 1 == Graph([v, w], [vw, ]).size()
     print('hi')
     for n in range(8):
         print(n)
         g = Graph(make_vertices(n))
         g.add_all_edges()
         assert (n * (n - 1)) // 2 == g.size()