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.

27 lines
465B

  1. from abp.graphstate import GraphState
  2. from abp import clifford
  3. import time
  4. import json
  5. def demograph():
  6. """ A graph for testing with """
  7. g = GraphState()
  8. g.add_edge(0, 1)
  9. g.add_edge(1, 2)
  10. g.add_edge(2, 0)
  11. g.add_edge(0, 3)
  12. g.add_edge(100, 200)
  13. return g
  14. def test_json_basic():
  15. """ Test that we can export to JSON """
  16. g = demograph()
  17. js = g.to_json()
  18. assert "ngbh" in js
  19. assert "vops" in js
  20. json.loads(js)