connect_nodes(self.nodes[a], b)
is confusing because
- the types of the arguments differ
- the test framework is aware of all nodes, so solving
a
toself.nodes[a]
can be done hidden from the caller
This should be fixed by replacing connect_nodes(self.nodes[a], b)
with self.connect_nodes(a, b)
and removing the global connect_nodes
.