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.

24 lines
535B

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