Fix comparison logic in Graph class
This commit is contained in:
parent
2b51674144
commit
455a518352
1 changed files with 3 additions and 0 deletions
|
|
@ -85,6 +85,9 @@ class Graph:
|
||||||
if different_vertices is None:
|
if different_vertices is None:
|
||||||
different_vertices = []
|
different_vertices = []
|
||||||
for vertex in self.vertices:
|
for vertex in self.vertices:
|
||||||
|
other_vertex = other.get_vertex(vertex.id)
|
||||||
|
if other_vertex is None:
|
||||||
|
continue
|
||||||
if (
|
if (
|
||||||
vertex.id in different_vertices
|
vertex.id in different_vertices
|
||||||
or vertex.__repr__() != other.get_vertex(vertex.id).__repr__()
|
or vertex.__repr__() != other.get_vertex(vertex.id).__repr__()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue