Anders and Briegel in Python
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
559B

  1. import cz
  2. from graph import *
  3. import viz
  4. def test_local_complementation():
  5. """ Test that local complementation works as expected """
  6. g, vops = graph()
  7. add_edge(g, 0, 1)
  8. add_edge(g, 0, 2)
  9. add_edge(g, 1, 2)
  10. add_edge(g, 0, 3)
  11. cz.local_complementation(g, vops, 0)
  12. assert has_edge(g, 0, 1)
  13. assert has_edge(g, 0, 2)
  14. assert not has_edge(g, 1, 2)
  15. assert has_edge(g, 3, 2)
  16. assert has_edge(g, 3, 1)
  17. # TODO: test VOP conditions
  18. def test_remove_vop():
  19. """ Test that removing VOPs really works """
  20. pass