warning_contains = "A few of your vertices"
elif num_isolates > 1:
warning_contains = "A large number of your vertices"
for i in range(len(w)):
flag += warning_contains in str(w[i].message)
assert flag == 1
// Check that the first isolate has no edges in our umap.graph_
isolated_vertices = disconnected_vertices(model)
assert isolated_vertices[10] == True
After Change
warning_contains = "A few of your vertices"
elif num_isolates > 1:
warning_contains = "A large number of your vertices"
for wn in w:
flag += warning_contains in str(wn.message)
assert flag == 1, str([wn.message for wn in w])
// Check that the first isolate has no edges in our umap.graph_
isolated_vertices = disconnected_vertices(model)
assert isolated_vertices[10] == True