Skip to content

Commit

Permalink
Update syntax for new networkx
Browse files Browse the repository at this point in the history
  • Loading branch information
mkhorton committed Nov 6, 2019
1 parent b3b5bc1 commit 5c95115
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pymatgen/analysis/tests/test_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,13 +694,13 @@ def test_construction(self):
self.assertEqual(mol_graph.graph.adj, ref_mol_graph.graph.adj)
for node in mol_graph.graph.nodes:
self.assertEqual(
mol_graph.graph.node[node]["specie"],
ref_mol_graph.graph.node[node]["specie"],
mol_graph.graph.nodes[node]["specie"],
ref_mol_graph.graph.nodes[node]["specie"],
)
for ii in range(3):
self.assertEqual(
mol_graph.graph.node[node]["coords"][ii],
ref_mol_graph.graph.node[node]["coords"][ii],
mol_graph.graph.nodes[node]["coords"][ii],
ref_mol_graph.graph.nodes[node]["coords"][ii],
)

edges_pc = {(e[0], e[1]): {"weight": 1.0} for e in self.pc_edges}
Expand All @@ -711,13 +711,13 @@ def test_construction(self):
self.assertEqual(mol_graph.graph.adj, ref_mol_graph.graph.adj)
for node in mol_graph.graph:
self.assertEqual(
mol_graph.graph.node[node]["specie"],
ref_mol_graph.graph.node[node]["specie"],
mol_graph.graph.nodes[node]["specie"],
ref_mol_graph.graph.nodes[node]["specie"],
)
for ii in range(3):
self.assertEqual(
mol_graph.graph.node[node]["coords"][ii],
ref_mol_graph.graph.node[node]["coords"][ii],
mol_graph.graph.nodes[node]["coords"][ii],
ref_mol_graph.graph.nodes[node]["coords"][ii],
)

mol_graph_edges = MoleculeGraph.with_edges(self.pc, edges=edges_pc)
Expand Down

0 comments on commit 5c95115

Please sign in to comment.