MCPcopy
hub / github.com/networkx/networkx / test_dynamic_mode

Method test_dynamic_mode

networkx/readwrite/tests/test_gexf.py:503–514  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

501 assert H.nodes[1]["networkx_key"] == list_value
502
503 def test_dynamic_mode(self):
504 G = nx.Graph()
505 G.add_node(1, label="1", color="green")
506 G.graph["mode"] = "dynamic"
507 fh = io.BytesIO()
508 nx.write_gexf(G, fh)
509 fh.seek(0)
510 H = nx.read_gexf(fh, node_type=int)
511 assert sorted(G.nodes()) == sorted(H.nodes())
512 assert sorted(sorted(e) for e in G.edges()) == sorted(
513 sorted(e) for e in H.edges()
514 )
515
516 def test_multigraph_with_missing_attributes(self):
517 G = nx.MultiGraph()

Callers

nothing calls this directly

Calls 3

add_nodeMethod · 0.95
nodesMethod · 0.95
edgesMethod · 0.95

Tested by

no test coverage detected