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.

test_layout.py 335B

8 vuotta sitten
123456789101112131415
  1. from demograph import demograph
  2. def test_nx_convert():
  3. g = demograph()
  4. n = g.to_networkx()
  5. assert len(g.ngbh) == len(n.edge)
  6. assert len(g.vops) == len(n.node)
  7. def test_layout():
  8. g = demograph()
  9. g.layout()
  10. assert len(g.meta) == len(g.vops)
  11. assert "pos" in g.meta[0]
  12. assert "x" in g.meta[0]["pos"]