Anders and Briegel in Python
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_graph.py 280B

12345678910111213141516
  1. from nose import with_setup
  2. import abp
  3. def setup():
  4. global g
  5. g = abp.GraphRegister(10)
  6. @with_setup(setup)
  7. def test_adding():
  8. g.add_edge(0,1)
  9. g.add_edge(1,2)
  10. g.toggle_edge(2,0)
  11. g.toggle_edge(2,3)
  12. g.toggle_edge(3,2)
  13. assert(len(g.edgelist()) == 3)