Changeset View
Changeset View
Standalone View
Standalone View
swh/graph/tests/test_api_client.py
Show First 20 Lines • Show All 161 Lines • ▼ Show 20 Lines | expected = [ | ||||
( | ( | ||||
"swh:1:rev:0000000000000000000000000000000000000003", | "swh:1:rev:0000000000000000000000000000000000000003", | ||||
"swh:1:dir:0000000000000000000000000000000000000002", | "swh:1:dir:0000000000000000000000000000000000000002", | ||||
), | ), | ||||
] | ] | ||||
# As there are four valid answers (up to reordering), we cannot check for | # As there are four valid answers (up to reordering), we cannot check for | ||||
# equality. Instead, we check the client returned all edges but one. | # equality. Instead, we check the client returned all edges but one. | ||||
assert set(actual).issubset(set(expected)) | assert set(actual).issubset(set(expected)) | ||||
assert len(actual) == 4 | assert len(actual) == 3 | ||||
def test_visit_edges_diamond_pattern(graph_client): | def test_visit_edges_diamond_pattern(graph_client): | ||||
actual = list( | actual = list( | ||||
graph_client.visit_edges( | graph_client.visit_edges( | ||||
"swh:1:rev:0000000000000000000000000000000000000009", edges="*", | "swh:1:rev:0000000000000000000000000000000000000009", edges="*", | ||||
) | ) | ||||
) | ) | ||||
▲ Show 20 Lines • Show All 192 Lines • Show Last 20 Lines |