UT: Use sets for simpler sequence comparison
This commit is contained in:
parent
1a8c285d8e
commit
f52f8eccd5
|
@ -42,9 +42,7 @@ def test_serialization():
|
||||||
assert len(serialized_node["connections"]) == len(node_dict["connections"])
|
assert len(serialized_node["connections"]) == len(node_dict["connections"])
|
||||||
|
|
||||||
for key, value in serialized_node["connections"].items():
|
for key, value in serialized_node["connections"].items():
|
||||||
set_a = set(value)
|
assert set(value) == set(node_dict["connections"][key])
|
||||||
set_b = node_dict["connections"][key]
|
|
||||||
len(set_a.intersection(set_b)) == len(set_a) == len(set_b) == len(value)
|
|
||||||
|
|
||||||
|
|
||||||
def test_machine_id_immutable():
|
def test_machine_id_immutable():
|
||||||
|
|
Loading…
Reference in New Issue