Anders and Briegel in Python
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

test_layout.py 335B

8 年前
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"]